2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Display custom admin ranks in messages.

This commit is contained in:
John Preston
2019-07-19 15:34:09 +02:00
parent 22f210ea8e
commit f36e2981ca
20 changed files with 252 additions and 140 deletions

View File

@@ -62,10 +62,11 @@ public:
base::flat_set<not_null<PeerData*>> markupSenders;
base::flat_set<not_null<UserData*>> bots;
// For admin badges, full admins list.
base::flat_set<UserId> admins;
// For admin badges, full admins list with ranks.
base::flat_map<UserId, QString> admins;
UserData *creator = nullptr; // nullptr means unknown
QString creatorRank;
int botStatus = 0; // -1 - no bots, 0 - unknown, 1 - one bot, that sees all history, 2 - other
bool joinedMessageFound = false;
MTPInputStickerSet stickerSet = MTP_inputStickerSetEmpty();
@@ -208,7 +209,8 @@ public:
void applyEditAdmin(
not_null<UserData*> user,
const MTPChatAdminRights &oldRights,
const MTPChatAdminRights &newRights);
const MTPChatAdminRights &newRights,
const QString &rank);
void applyEditBanned(
not_null<UserData*> user,
const MTPChatBannedRights &oldRights,
@@ -454,4 +456,8 @@ void ApplyChannelUpdate(
not_null<ChannelData*> channel,
const MTPDchannelFull &update);
void ApplyChannelAdmins(
not_null<ChannelData*> channel,
const MTPDchannels_channelParticipants &data);
} // namespace Data