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

Allow pinned messages in channels.

This commit is contained in:
John Preston
2017-11-21 17:23:56 +04:00
parent b337d54623
commit 75d8d01b17
14 changed files with 240 additions and 145 deletions

View File

@@ -5449,12 +5449,8 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
case mtpc_updateChannelPinnedMessage: {
auto &d = update.c_updateChannelPinnedMessage();
if (auto channel = App::channelLoaded(d.vchannel_id.v)) {
if (channel->isMegagroup()) {
channel->mgInfo->pinnedMsgId = d.vid.v;
Auth().api().fullPeerUpdated().notify(channel);
}
channel->setPinnedMessageId(d.vid.v);
}
} break;