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

Save admins in legacy groups.

This commit is contained in:
John Preston
2019-01-10 16:38:57 +04:00
parent dba9ca2084
commit 07e010dfb5
6 changed files with 233 additions and 152 deletions

View File

@@ -198,7 +198,9 @@ rpl::producer<int> AdminsCountValue(not_null<PeerData*> peer) {
chat,
Flag::AdminsChanged | Flag::RightsChanged
) | rpl::map([=] {
return int(chat->admins.size());
return chat->participants.empty()
? 0
: int(chat->admins.size() + 1); // + creator
});
} else if (const auto channel = peer->asChannel()) {
return Notify::PeerUpdateValue(