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

Show bot privacy status

This commit is contained in:
RadRussianRus
2020-04-30 18:31:44 +03:00
committed by John Preston
parent 95b4f56b86
commit ca49e74b6f
5 changed files with 20 additions and 2 deletions

View File

@@ -130,7 +130,7 @@ public:
LastSeen,
Custom,
};
void refreshStatus();
virtual void refreshStatus();
crl::time refreshStatusTime() const;
void setAbsoluteIndex(int index) {

View File

@@ -1786,6 +1786,12 @@ std::unique_ptr<PeerListRow> ParticipantsBoxController::createRow(
|| _additional.canEditAdmin(user))) {
row->setActionLink(tr::lng_profile_kick(tr::now));
}
if (_role == Role::Members && user->isBot()) {
auto seesAllMessages = (user->botInfo->readsAllHistory || _additional.adminRights(user).has_value());
row->setCustomStatus(seesAllMessages
? tr::lng_status_bot_reads_all(tr::now)
: tr::lng_status_bot_not_reads_all(tr::now));
}
}
return row;
}