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

Use different phrases for default restrictions.

This commit is contained in:
John Preston
2019-01-14 21:43:06 +04:00
parent 4f33be20d4
commit 22f1ffc72b
16 changed files with 359 additions and 171 deletions

View File

@@ -1047,16 +1047,23 @@ void History::applyServiceChanges(
} break;
case mtpc_messageActionChatMigrateTo: {
if (auto chat = peer->asChat()) {
if (const auto chat = peer->asChat()) {
chat->addFlags(MTPDchat::Flag::f_deactivated);
const auto &d = action.c_messageActionChatMigrateTo();
if (const auto channel = App::channelLoaded(d.vchannel_id.v)) {
Data::ApplyMigration(chat, channel);
}
}
//auto &d = action.c_messageActionChatMigrateTo();
//auto channel = App::channelLoaded(d.vchannel_id.v);
} break;
case mtpc_messageActionChannelMigrateFrom: {
//auto &d = action.c_messageActionChannelMigrateFrom();
//auto chat = App::chatLoaded(d.vchat_id.v);
if (const auto channel = peer->asChannel()) {
channel->addFlags(MTPDchannel::Flag::f_megagroup);
const auto &d = action.c_messageActionChannelMigrateFrom();
if (const auto chat = App::chatLoaded(d.vchat_id.v)) {
Data::ApplyMigration(chat, channel);
}
}
} break;
case mtpc_messageActionPinMessage: {