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

Improve phrases for removed users.

This commit is contained in:
John Preston
2019-01-21 10:26:19 +04:00
parent bf85b0c109
commit 7df5df6351
4 changed files with 63 additions and 15 deletions

View File

@@ -1759,11 +1759,15 @@ void ApiWrap::saveDefaultRestrictions(
if (error.type() == qstr("CHAT_NOT_MODIFIED")) {
if (const auto chat = peer->asChat()) {
chat->setDefaultRestrictions(rights);
if (callback) {
callback(true);
}
return;
} else if (const auto channel = peer->asChannel()) {
channel->setDefaultRestrictions(rights);
} else {
Unexpected("Peer in ApiWrap::saveDefaultRestrictions.");
}
if (callback) {
callback(true);
}
return;
}
if (callback) {
callback(false);