Fixed update of flag for group calls from mtp chat data.

This commit is contained in:
23rd 2023-01-20 17:42:09 +03:00 committed by John Preston
parent 0c17bdc783
commit cd032f5c16

View file

@ -805,6 +805,8 @@ not_null<PeerData*> Session::processChat(const MTPChat &data) {
const auto canViewMembers = channel->canViewMembers();
const auto canAddMembers = channel->canAddMembers();
const auto wasCallNotEmpty = Data::ChannelHasActiveCall(channel);
if (const auto count = data.vparticipants_count()) {
channel->setMembersCount(count->v);
}
@ -912,6 +914,9 @@ not_null<PeerData*> Session::processChat(const MTPChat &data) {
|| canAddMembers != channel->canAddMembers()) {
flags |= UpdateFlag::Rights;
}
if (wasCallNotEmpty != Data::ChannelHasActiveCall(channel)) {
flags |= UpdateFlag::GroupCall;
}
}, [&](const MTPDchannelForbidden &data) {
const auto channel = result->asChannel();