From ebd958782135eddff3f4013ee4837db8187e45d3 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 3 Dec 2021 15:02:45 +0400 Subject: [PATCH] Fix admin ranks in participants edit. --- Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp index cd0c9df29..8fd36a7cc 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp @@ -662,7 +662,7 @@ UserData *ParticipantsAdditionalData::applyCreator( } else { _adminCanEdit.erase(user); } - if (data.rank().isEmpty()) { + if (!data.rank().isEmpty()) { _adminRanks[user] = data.rank(); } else { _adminRanks.remove(user); @@ -693,7 +693,7 @@ UserData *ParticipantsAdditionalData::applyAdmin( } else { _adminCanEdit.erase(user); } - if (data.rank().isEmpty()) { + if (!data.rank().isEmpty()) { _adminRanks[user] = data.rank(); } else { _adminRanks.remove(user);