2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

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