Add approver_user_id to chatEventMemberJoinedByInviteLink.
This commit is contained in:
parent
e49ae700b6
commit
aee782562c
@ -2510,8 +2510,8 @@ chatEventMessageUnpinned message:message = ChatEventAction;
|
||||
//@description A new member joined the chat
|
||||
chatEventMemberJoined = ChatEventAction;
|
||||
|
||||
//@description A new member joined the chat by an invite link @invite_link Invite link used to join the chat
|
||||
chatEventMemberJoinedByInviteLink invite_link:chatInviteLink = ChatEventAction;
|
||||
//@description A new member joined the chat by an invite link @invite_link Invite link used to join the chat @approver_user_id User identifier of the chat administrator, approved user join request; 0 if the approval wasn't needed
|
||||
chatEventMemberJoinedByInviteLink invite_link:chatInviteLink approver_user_id:int53 = ChatEventAction;
|
||||
|
||||
//@description A member left the chat
|
||||
chatEventMemberLeft = ChatEventAction;
|
||||
|
@ -31743,10 +31743,23 @@ tl_object_ptr<td_api::ChatEventAction> MessagesManager::get_chat_event_action_ob
|
||||
return nullptr;
|
||||
}
|
||||
return make_tl_object<td_api::chatEventMemberJoinedByInviteLink>(
|
||||
invite_link.get_chat_invite_link_object(td_->contacts_manager_.get()));
|
||||
invite_link.get_chat_invite_link_object(td_->contacts_manager_.get()), 0);
|
||||
}
|
||||
case telegram_api::channelAdminLogEventActionParticipantJoinByRequest::ID:
|
||||
case telegram_api::channelAdminLogEventActionParticipantJoinByRequest::ID: {
|
||||
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionParticipantJoinByRequest>(action_ptr);
|
||||
DialogInviteLink invite_link(std::move(action->invite_));
|
||||
if (!invite_link.is_valid()) {
|
||||
LOG(ERROR) << "Wrong invite link: " << invite_link;
|
||||
return nullptr;
|
||||
}
|
||||
UserId approver_user_id(action->approved_by_);
|
||||
if (!approver_user_id.is_valid()) {
|
||||
return nullptr;
|
||||
}
|
||||
return make_tl_object<td_api::chatEventMemberJoinedByInviteLink>(
|
||||
invite_link.get_chat_invite_link_object(td_->contacts_manager_.get()),
|
||||
td_->contacts_manager_->get_user_id_object(approver_user_id, "chatEventMemberJoinedByInviteLink"));
|
||||
}
|
||||
case telegram_api::channelAdminLogEventActionParticipantLeave::ID:
|
||||
return make_tl_object<td_api::chatEventMemberLeft>();
|
||||
case telegram_api::channelAdminLogEventActionParticipantInvite::ID: {
|
||||
|
Loading…
Reference in New Issue
Block a user