mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
parent
bba511409f
commit
8cdf8d5edc
1 changed files with 2 additions and 1 deletions
|
@ -290,7 +290,8 @@ void GroupMembersWidget::setItemFlags(
|
||||||
using AdminState = Item::AdminState;
|
using AdminState = Item::AdminState;
|
||||||
const auto user = getMember(item)->user();
|
const auto user = getMember(item)->user();
|
||||||
const auto isCreator = (peerFromUser(chat->creator) == item->peer->id);
|
const auto isCreator = (peerFromUser(chat->creator) == item->peer->id);
|
||||||
const auto isAdmin = chat->hasAdminRights();
|
const auto isAdmin = (item->peer->isSelf() && chat->hasAdminRights())
|
||||||
|
|| chat->admins.contains(user);
|
||||||
const auto adminState = isCreator
|
const auto adminState = isCreator
|
||||||
? AdminState::Creator
|
? AdminState::Creator
|
||||||
: isAdmin
|
: isAdmin
|
||||||
|
|
Loading…
Add table
Reference in a new issue