diff --git a/Telegram/SourceFiles/data/data_channel.cpp b/Telegram/SourceFiles/data/data_channel.cpp index 6f25e02c8..ca1bd81b2 100644 --- a/Telegram/SourceFiles/data/data_channel.cpp +++ b/Telegram/SourceFiles/data/data_channel.cpp @@ -19,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "data/data_histories.h" #include "data/data_group_call.h" #include "data/data_message_reactions.h" +#include "data/data_wall_paper.h" #include "data/notify/data_notify_settings.h" #include "main/main_session.h" #include "main/session/send_as_peers.h" @@ -1142,6 +1143,13 @@ void ApplyChannelUpdate( session->sendAsPeers().setChosen(channel, PeerId()); } + if (const auto paper = update.vwallpaper()) { + channel->setWallPaper( + Data::WallPaper::Create(&channel->session(), *paper)); + } else { + channel->setWallPaper({}); + } + // For clearUpTill() call. channel->owner().sendHistoryChangeNotifications(); } diff --git a/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp b/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp index d268d4b3f..b9ebe4bb5 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp @@ -509,8 +509,11 @@ rpl::producer ThemeDocumentBox::button() { } ClickHandlerPtr ThemeDocumentBox::createViewLink() { - const auto out = _parent->data()->out(); const auto to = _parent->history()->peer; + if (to->isChannel()) { + return nullptr; + } + const auto out = _parent->data()->out(); const auto media = _parent->data()->media(); const auto weak = base::make_weak(_parent); const auto paper = media ? media->paper() : nullptr;