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

Fix removing chats from dialogs.

This commit is contained in:
John Preston
2019-01-22 17:05:06 +04:00
parent ebc2043055
commit bf87de3706
5 changed files with 17 additions and 19 deletions

View File

@@ -350,7 +350,7 @@ bool PeerData::canPinMessages() const {
if (const auto user = asUser()) {
return user->fullFlags() & MTPDuserFull::Flag::f_can_pin_message;
} else if (const auto chat = asChat()) {
return !chat->isDeactivated()
return chat->amIn()
&& ((chat->adminRights() & ChatAdminRight::f_pin_messages)
|| chat->amCreator());
} else if (const auto channel = asChannel()) {