Add td_api::chatEventLinkedChatChanged.
GitOrigin-RevId: 6cd8d1a58db0d64bc98b7d738bc901dd8a8e5e39
This commit is contained in:
parent
73162dce06
commit
14d339b0bc
@ -1908,6 +1908,9 @@ chatEventPhotoChanged old_photo:photo new_photo:photo = ChatEventAction;
|
|||||||
//@description The can_invite_users permission of a supergroup chat was toggled @can_invite_users New value of can_invite_users permission
|
//@description The can_invite_users permission of a supergroup chat was toggled @can_invite_users New value of can_invite_users permission
|
||||||
chatEventInvitesToggled can_invite_users:Bool = ChatEventAction;
|
chatEventInvitesToggled can_invite_users:Bool = ChatEventAction;
|
||||||
|
|
||||||
|
//@description The linked_chat_id of a supergroup was changed @old_linked_chat_id Previous supergroup linked chat identifier @new_linked_chat_id New supergroup linked chat identifier
|
||||||
|
chatEventLinkedChatChanged old_linked_chat_id:int53 new_linked_chat_id:int53 = ChatEventAction;
|
||||||
|
|
||||||
//@description The sign_messages setting of a channel was toggled @sign_messages New value of sign_messages
|
//@description The sign_messages setting of a channel was toggled @sign_messages New value of sign_messages
|
||||||
chatEventSignMessagesToggled sign_messages:Bool = ChatEventAction;
|
chatEventSignMessagesToggled sign_messages:Bool = ChatEventAction;
|
||||||
|
|
||||||
|
Binary file not shown.
@ -23566,6 +23566,28 @@ tl_object_ptr<td_api::ChatEventAction> MessagesManager::get_chat_event_action_ob
|
|||||||
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionTogglePreHistoryHidden>(action_ptr);
|
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionTogglePreHistoryHidden>(action_ptr);
|
||||||
return make_tl_object<td_api::chatEventIsAllHistoryAvailableToggled>(!action->new_value_);
|
return make_tl_object<td_api::chatEventIsAllHistoryAvailableToggled>(!action->new_value_);
|
||||||
}
|
}
|
||||||
|
case telegram_api::channelAdminLogEventActionChangeLinkedChat::ID: {
|
||||||
|
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionChangeLinkedChat>(action_ptr);
|
||||||
|
|
||||||
|
auto get_dialog_from_channel_id = [this](int32 channel_id_int) {
|
||||||
|
ChannelId channel_id(channel_id_int);
|
||||||
|
if (!channel_id.is_valid()) {
|
||||||
|
return DialogId();
|
||||||
|
}
|
||||||
|
|
||||||
|
DialogId dialog_id(channel_id);
|
||||||
|
force_create_dialog(dialog_id, "get_dialog_from_channel_id");
|
||||||
|
return dialog_id;
|
||||||
|
};
|
||||||
|
|
||||||
|
auto old_linked_dialog_id = get_dialog_from_channel_id(action->prev_value_);
|
||||||
|
auto new_linked_dialog_id = get_dialog_from_channel_id(action->new_value_);
|
||||||
|
if (old_linked_dialog_id == new_linked_dialog_id) {
|
||||||
|
LOG(ERROR) << "Receive the same linked " << new_linked_dialog_id;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return make_tl_object<td_api::chatEventLinkedChatChanged>(old_linked_dialog_id.get(), new_linked_dialog_id.get());
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user