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

Handle for_both chat wallpaper change.

This commit is contained in:
John Preston
2023-11-23 11:16:32 +04:00
parent f8825e8135
commit 324f2f68ba
16 changed files with 164 additions and 56 deletions

View File

@@ -1991,6 +1991,18 @@ void Updates::feedUpdate(const MTPUpdate &update) {
}
} break;
case mtpc_updatePeerWallpaper: {
const auto &d = update.c_updatePeerWallpaper();
if (const auto peer = session().data().peerLoaded(peerFromMTP(d.vpeer()))) {
if (const auto paper = d.vwallpaper()) {
peer->setWallPaper(
Data::WallPaper::Create(&session(), *paper));
} else {
peer->setWallPaper({});
}
}
} break;
case mtpc_updateBotCommands: {
const auto &d = update.c_updateBotCommands();
if (const auto peer = session().data().peerLoaded(peerFromMTP(d.vpeer()))) {