2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +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

@@ -395,13 +395,13 @@ void ApiWrap::gotChatFull(PeerData *peer, const MTPmessages_ChatFull &result, mt
}
accumulate_max(h->outboxReadBefore, f.vread_outbox_max_id.v + 1);
}
ranges::overload([] {}, [](int a) {});
if (f.has_pinned_msg_id()) {
channel->setPinnedMessageId(f.vpinned_msg_id.v);
} else {
channel->clearPinnedMessage();
}
if (channel->isMegagroup()) {
if (f.has_pinned_msg_id()) {
channel->mgInfo->pinnedMsgId = f.vpinned_msg_id.v;
} else {
channel->mgInfo->pinnedMsgId = 0;
}
auto stickersChanged = (canEditStickers != channel->canEditStickers());
auto stickerSet = (f.has_stickerset() ? &f.vstickerset.c_stickerSet() : nullptr);
auto newSetId = (stickerSet ? stickerSet->vid.v : 0);