2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Improve update handling for legacy chats.

This commit is contained in:
John Preston
2019-01-13 12:03:34 +04:00
parent 215856adc3
commit 67d12fa6d2
28 changed files with 650 additions and 797 deletions

View File

@@ -350,10 +350,9 @@ bool PeerData::canPinMessages() const {
if (const auto user = asUser()) {
return user->fullFlags() & MTPDuserFull::Flag::f_can_pin_message;
} else if (const auto chat = asChat()) {
// #TODO groups
return !chat->isDeactivated()
/*&& ((chat->adminRights() & ChatAdminRight::f_pin_messages)
|| chat->amCreator())*/;
&& ((chat->adminRights() & ChatAdminRight::f_pin_messages)
|| chat->amCreator());
} else if (const auto channel = asChannel()) {
if (channel->isMegagroup()) {
return (channel->adminRights() & ChatAdminRight::f_pin_messages)