diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 3c1d00e76..de6d6bf0d 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -4320,6 +4320,9 @@ chatEventMemberRestricted member_id:MessageSender old_status:ChatMemberStatus ne //@description The chat available reactions were changed @old_available_reactions Previous chat available reactions @new_available_reactions New chat available reactions chatEventAvailableReactionsChanged old_available_reactions:ChatAvailableReactions new_available_reactions:ChatAvailableReactions = ChatEventAction; +//@description The chat background was changed @old_background Previous background; may be null if none @new_background New background; may be null if none +chatEventBackgroundChanged old_background:chatBackground new_background:chatBackground = ChatEventAction; + //@description The chat description was changed @old_description Previous chat description @new_description New chat description chatEventDescriptionChanged old_description:string new_description:string = ChatEventAction; diff --git a/td/telegram/DialogEventLog.cpp b/td/telegram/DialogEventLog.cpp index 35f740ec8..03e28faf8 100644 --- a/td/telegram/DialogEventLog.cpp +++ b/td/telegram/DialogEventLog.cpp @@ -7,6 +7,7 @@ #include "td/telegram/DialogEventLog.h" #include "td/telegram/AccentColorId.h" +#include "td/telegram/BackgroundInfo.h" #include "td/telegram/ChannelId.h" #include "td/telegram/ChatReactions.h" #include "td/telegram/ContactsManager.h" @@ -450,8 +451,13 @@ static td_api::object_ptr get_chat_event_action_object( td->theme_manager_->get_profile_accent_color_id_object(new_peer_color.accent_color_id_), new_peer_color.background_custom_emoji_id_.get()); } - case telegram_api::channelAdminLogEventActionChangeWallpaper::ID: - return nullptr; + case telegram_api::channelAdminLogEventActionChangeWallpaper::ID: { + auto action = move_tl_object_as(action_ptr); + auto old_background_info = BackgroundInfo(td, std::move(action->prev_value_)); + auto new_background_info = BackgroundInfo(td, std::move(action->new_value_)); + return td_api::make_object( + old_background_info.get_chat_background_object(td), new_background_info.get_chat_background_object(td)); + } case telegram_api::channelAdminLogEventActionChangeEmojiStatus::ID: return nullptr; default: