2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

not invalidating participants when admins not needed

This commit is contained in:
John Preston
2015-11-24 13:40:18 +03:00
parent 3cf4c7f2fc
commit b69f0db975
3 changed files with 16 additions and 8 deletions

View File

@@ -437,7 +437,8 @@ void ApiWrap::requestPeers(const QList<PeerData*> &peers) {
void ApiWrap::requestLastParticipants(ChannelData *peer, bool fromStart) {
if (!peer || !peer->isMegagroup()) return;
if ((peer->mgInfo->lastParticipantsStatus & MegagroupInfo::LastParticipantsAdminsOutdated) || peer->lastParticipantsCountOutdated()) {
bool needAdmins = peer->amEditor(), adminsOutdated = (peer->mgInfo->lastParticipantsStatus & MegagroupInfo::LastParticipantsAdminsOutdated);
if ((needAdmins && adminsOutdated) || peer->lastParticipantsCountOutdated()) {
fromStart = true;
}
QMap<PeerData*, mtpRequestId>::iterator i = _participantsRequests.find(peer);