Add chatInviteLinkMember.approver_user_id.

This commit is contained in:
levlam 2021-10-09 13:51:37 +03:00
parent 63d86176f2
commit 5d9a224386
2 changed files with 11 additions and 3 deletions

View File

@ -580,8 +580,8 @@ chatInviteLinkCount user_id:int53 invite_link_count:int32 revoked_invite_link_co
//@description Contains a list of chat invite link counts @invite_link_counts List of invite linkcounts
chatInviteLinkCounts invite_link_counts:vector<chatInviteLinkCount> = ChatInviteLinkCounts;
//@description Describes a chat member joined a chat by an invite link @user_id User identifier @joined_chat_date Point in time (Unix timestamp) when the user joined the chat
chatInviteLinkMember user_id:int53 joined_chat_date:int32 = ChatInviteLinkMember;
//@description Describes a chat member joined a chat by an invite link @user_id User identifier @joined_chat_date Point in time (Unix timestamp) when the user joined the chat @approver_user_id User identifier of the chat administrator, approved user join request
chatInviteLinkMember user_id:int53 joined_chat_date:int32 approver_user_id:int53 = ChatInviteLinkMember;
//@description Contains a list of chat members joined a chat by an invite link @total_count Approximate total count of chat members found @members List of chat members, joined a chat by an invite link
chatInviteLinkMembers total_count:int32 members:vector<chatInviteLinkMember> = ChatInviteLinkMembers;

View File

@ -1931,8 +1931,16 @@ class GetChatInviteImportersQuery final : public Td::ResultHandler {
total_count--;
continue;
}
UserId approver_user_id(importer->approved_by_);
if (!approver_user_id.is_valid() && approver_user_id != UserId()) {
LOG(ERROR) << "Receive invalid invite link approver " << approver_user_id << " for " << user_id << " in "
<< dialog_id_;
total_count--;
continue;
}
invite_link_members.push_back(td_api::make_object<td_api::chatInviteLinkMember>(
td->contacts_manager_->get_user_id_object(user_id, "chatInviteLinkMember"), importer->date_));
td->contacts_manager_->get_user_id_object(user_id, "chatInviteLinkMember"), importer->date_,
td->contacts_manager_->get_user_id_object(approver_user_id, "chatInviteLinkMember")));
}
promise_.set_value(td_api::make_object<td_api::chatInviteLinkMembers>(total_count, std::move(invite_link_members)));
}