Add td_api::chatEventAvailableReactionsChanged.

This commit is contained in:
levlam 2022-01-04 17:55:57 +03:00
parent 0957839cc6
commit 47a445851a
2 changed files with 13 additions and 2 deletions

View File

@ -2573,6 +2573,9 @@ chatEventMemberPromoted user_id:int53 old_status:ChatMemberStatus new_status:Cha
//@description A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed @member_id Affected chat member identifier @old_status Previous status of the chat member @new_status New status of the chat member //@description A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed @member_id Affected chat member identifier @old_status Previous status of the chat member @new_status New status of the chat member
chatEventMemberRestricted member_id:MessageSender old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction; chatEventMemberRestricted member_id:MessageSender old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction;
//@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:vector<string> new_available_reactions:vector<string> = ChatEventAction;
//@description The chat description was changed @old_description Previous chat description @new_description New chat description //@description The chat description was changed @old_description Previous chat description @new_description New chat description
chatEventDescriptionChanged old_description:string new_description:string = ChatEventAction; chatEventDescriptionChanged old_description:string new_description:string = ChatEventAction;

View File

@ -340,8 +340,16 @@ static td_api::object_ptr<td_api::ChatEventAction> get_chat_event_action_object(
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionToggleNoForwards>(action_ptr); auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionToggleNoForwards>(action_ptr);
return td_api::make_object<td_api::chatEventHasProtectedContentToggled>(action->new_value_); return td_api::make_object<td_api::chatEventHasProtectedContentToggled>(action->new_value_);
} }
case telegram_api::channelAdminLogEventActionChangeAvailableReactions::ID: case telegram_api::channelAdminLogEventActionChangeAvailableReactions::ID: {
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionChangeAvailableReactions>(action_ptr);
auto old_value = td->stickers_manager_->get_active_reactions(std::move(action->prev_value_));
auto new_value = td->stickers_manager_->get_active_reactions(std::move(action->new_value_));
if (old_value == new_value) {
return nullptr; return nullptr;
}
return td_api::make_object<td_api::chatEventAvailableReactionsChanged>(std::move(old_value),
std::move(new_value));
}
default: default:
UNREACHABLE(); UNREACHABLE();
return nullptr; return nullptr;