Fix check for export chat invite link.
GitOrigin-RevId: aa754d8faa04741ea400450ff58f23ca9443dca8
This commit is contained in:
parent
0c3e3906c7
commit
dda4c4fc7d
@ -3381,7 +3381,7 @@ readFilePart file_id:int32 offset:int32 count:int32 = FilePart;
|
||||
deleteFile file_id:int32 = Ok;
|
||||
|
||||
|
||||
//@description Generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. Requires can_invite_users right @chat_id Chat identifier
|
||||
//@description Generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right @chat_id Chat identifier
|
||||
generateChatInviteLink chat_id:int53 = ChatInviteLink;
|
||||
|
||||
//@description Checks the validity of an invite link for a chat and returns information about the corresponding chat @invite_link Invite link to be checked; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/"
|
||||
|
@ -4535,7 +4535,7 @@ void ContactsManager::export_chat_invite_link(ChatId chat_id, Promise<Unit> &&pr
|
||||
return promise.set_error(Status::Error(3, "Chat is deactivated"));
|
||||
}
|
||||
|
||||
if (!get_chat_permissions(c).can_invite_users()) {
|
||||
if (!get_chat_status(c).can_invite_users()) {
|
||||
return promise.set_error(Status::Error(3, "Not enough rights to export chat invite link"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user