Add more information in td_api::chatInviteLinkInfo.
This commit is contained in:
parent
89e2a29926
commit
f4a8338232
@ -913,7 +913,10 @@ chatInviteLinkMembers total_count:int32 members:vector<chatInviteLinkMember> = C
|
||||
//@member_user_ids User identifiers of some chat members that may be known to the current user
|
||||
//@creates_join_request True, if the link only creates join request
|
||||
//@is_public True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup
|
||||
chatInviteLinkInfo chat_id:int53 accessible_for:int32 type:ChatType title:string photo:chatPhotoInfo description:string member_count:int32 member_user_ids:vector<int53> creates_join_request:Bool is_public:Bool = ChatInviteLinkInfo;
|
||||
//@is_verified True, if the chat is verified
|
||||
//@is_scam True, if many users reported this chat as a scam
|
||||
//@is_fake True, if many users reported this chat as a fake account
|
||||
chatInviteLinkInfo chat_id:int53 accessible_for:int32 type:ChatType title:string photo:chatPhotoInfo description:string member_count:int32 member_user_ids:vector<int53> creates_join_request:Bool is_public:Bool is_verified:Bool is_scam:Bool is_fake:Bool = ChatInviteLinkInfo;
|
||||
|
||||
//@description Describes a user that sent a join request and waits for administrator approval @user_id User identifier @date Point in time (Unix timestamp) when the user sent the join request @bio A short bio of the user
|
||||
chatJoinRequest user_id:int53 date:int32 bio:string = ChatJoinRequest;
|
||||
|
@ -15535,6 +15535,9 @@ void ContactsManager::on_get_dialog_invite_link_info(const string &invite_link,
|
||||
|
||||
invite_link_info->is_public = is_public;
|
||||
invite_link_info->is_megagroup = is_megagroup;
|
||||
invite_link_info->is_verified = chat_invite->verified_;
|
||||
invite_link_info->is_scam = chat_invite->scam_;
|
||||
invite_link_info->is_fake = chat_invite->fake_;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -19537,6 +19540,9 @@ tl_object_ptr<td_api::chatInviteLinkInfo> ContactsManager::get_chat_invite_link_
|
||||
bool is_public = false;
|
||||
bool is_member = false;
|
||||
td_api::object_ptr<td_api::ChatType> chat_type;
|
||||
bool is_verified = false;
|
||||
bool is_scam = false;
|
||||
bool is_fake = false;
|
||||
|
||||
if (dialog_id.is_valid()) {
|
||||
switch (dialog_id.get_type()) {
|
||||
@ -19568,6 +19574,9 @@ tl_object_ptr<td_api::chatInviteLinkInfo> ContactsManager::get_chat_invite_link_
|
||||
is_megagroup = c->is_megagroup;
|
||||
participant_count = c->participant_count;
|
||||
is_member = c->status.is_member();
|
||||
is_verified = c->is_verified;
|
||||
is_scam = c->is_scam;
|
||||
is_fake = c->is_fake;
|
||||
} else {
|
||||
LOG(ERROR) << "Have no information about " << channel_id;
|
||||
}
|
||||
@ -19588,6 +19597,9 @@ tl_object_ptr<td_api::chatInviteLinkInfo> ContactsManager::get_chat_invite_link_
|
||||
member_user_ids = get_user_ids_object(invite_link_info->participant_user_ids, "get_chat_invite_link_info_object");
|
||||
creates_join_request = invite_link_info->creates_join_request;
|
||||
is_public = invite_link_info->is_public;
|
||||
is_verified = invite_link_info->is_verified;
|
||||
is_scam = invite_link_info->is_scam;
|
||||
is_fake = invite_link_info->is_fake;
|
||||
|
||||
if (invite_link_info->is_chat) {
|
||||
chat_type = td_api::make_object<td_api::chatTypeBasicGroup>(0);
|
||||
@ -19607,10 +19619,10 @@ tl_object_ptr<td_api::chatInviteLinkInfo> ContactsManager::get_chat_invite_link_
|
||||
}
|
||||
}
|
||||
|
||||
return make_tl_object<td_api::chatInviteLinkInfo>(
|
||||
return td_api::make_object<td_api::chatInviteLinkInfo>(
|
||||
td_->messages_manager_->get_chat_id_object(dialog_id, "chatInviteLinkInfo"), accessible_for, std::move(chat_type),
|
||||
title, get_chat_photo_info_object(td_->file_manager_.get(), photo), description, participant_count,
|
||||
std::move(member_user_ids), creates_join_request, is_public);
|
||||
std::move(member_user_ids), creates_join_request, is_public, is_verified, is_scam, is_fake);
|
||||
}
|
||||
|
||||
void ContactsManager::get_support_user(Promise<td_api::object_ptr<td_api::user>> &&promise) {
|
||||
|
@ -1140,6 +1140,9 @@ class ContactsManager final : public Actor {
|
||||
bool is_channel = false;
|
||||
bool is_public = false;
|
||||
bool is_megagroup = false;
|
||||
bool is_verified = false;
|
||||
bool is_scam = false;
|
||||
bool is_fake = false;
|
||||
};
|
||||
|
||||
struct PendingGetPhotoRequest {
|
||||
|
Loading…
Reference in New Issue
Block a user