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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user