Fix chatEventStickerSetChanged.

This commit is contained in:
levlam 2024-02-14 18:02:48 +03:00
parent 4160b1a31a
commit 862497601e

View File

@ -219,10 +219,6 @@ static td_api::object_ptr<td_api::ChatEventAction> get_chat_event_action_object(
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionChangeStickerSet>(action_ptr);
auto old_sticker_set_id = td->stickers_manager_->add_sticker_set(std::move(action->prev_stickerset_));
auto new_sticker_set_id = td->stickers_manager_->add_sticker_set(std::move(action->new_stickerset_));
if (!old_sticker_set_id.is_valid() || !new_sticker_set_id.is_valid()) {
LOG(ERROR) << "Skip " << to_string(action);
return nullptr;
}
return td_api::make_object<td_api::chatEventStickerSetChanged>(old_sticker_set_id.get(),
new_sticker_set_id.get());
}
@ -230,10 +226,6 @@ static td_api::object_ptr<td_api::ChatEventAction> get_chat_event_action_object(
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionChangeEmojiStickerSet>(action_ptr);
auto old_sticker_set_id = td->stickers_manager_->add_sticker_set(std::move(action->prev_stickerset_));
auto new_sticker_set_id = td->stickers_manager_->add_sticker_set(std::move(action->new_stickerset_));
if (!old_sticker_set_id.is_valid() || !new_sticker_set_id.is_valid()) {
LOG(ERROR) << "Skip " << to_string(action);
return nullptr;
}
return td_api::make_object<td_api::chatEventCustomEmojiStickerSetChanged>(old_sticker_set_id.get(),
new_sticker_set_id.get());
}