2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 16:45:12 +00:00

Fix channel admin rights checking.

This commit is contained in:
John Preston
2017-11-24 20:05:50 +04:00
parent da386f2c2e
commit bb7ab625c1

View File

@@ -1074,9 +1074,9 @@ bool ChannelData::canEditLastAdmin(not_null<UserData*> user) const {
if (mgInfo) { if (mgInfo) {
auto i = mgInfo->lastAdmins.constFind(user); auto i = mgInfo->lastAdmins.constFind(user);
if (i != mgInfo->lastAdmins.cend()) { if (i != mgInfo->lastAdmins.cend()) {
return !i->canEdit; return i->canEdit;
} }
return (user == mgInfo->creator); return (user != mgInfo->creator);
} }
return false; return false;
} }