2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

No 'Clear History' for everyone in groups.

This commit is contained in:
John Preston
2021-02-19 14:18:13 +04:00
parent 018232680f
commit 0a678ae8bd
4 changed files with 7 additions and 9 deletions

View File

@@ -583,16 +583,16 @@ void Filler::addChannelActions(not_null<ChannelData*> channel) {
}
}
if (channel->amIn()) {
auto text = isGroup
? tr::lng_profile_leave_group(tr::now)
: tr::lng_profile_leave_channel(tr::now);
_addAction(text, DeleteAndLeaveHandler(channel));
if ((isGroup && !channel->isPublic())
|| channel->canDeleteMessages()) {
_addAction(
tr::lng_profile_clear_history(tr::now),
ClearHistoryHandler(channel));
}
auto text = isGroup
? tr::lng_profile_leave_group(tr::now)
: tr::lng_profile_leave_channel(tr::now);
_addAction(text, DeleteAndLeaveHandler(channel));
} else {
auto text = isGroup
? tr::lng_profile_join_group(tr::now)