Support t.me/+ links.
This commit is contained in:
parent
f2f68aa3b3
commit
1403815148
@ -4465,11 +4465,11 @@ deleteRevokedChatInviteLink chat_id:int53 invite_link:string = Ok;
|
||||
//@description Deletes all revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id Chat identifier
|
||||
deleteAllRevokedChatInviteLinks chat_id:int53 = Ok;
|
||||
|
||||
//@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; must begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/"
|
||||
//@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; must have URL "t.me", "telegram.me", or "telegram.dog" and query beginning with "/joinchat/" or "/+"
|
||||
checkChatInviteLink invite_link:string = ChatInviteLinkInfo;
|
||||
|
||||
//@description Uses an invite link to add the current user to the chat if possible
|
||||
//@invite_link Invite link to import; must begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/"
|
||||
//@invite_link Invite link to import; must have URL "t.me", "telegram.me", or "telegram.dog" and query beginning with "/joinchat/" or "/+"
|
||||
joinChatByInviteLink invite_link:string = Chat;
|
||||
|
||||
|
||||
|
@ -14,8 +14,11 @@
|
||||
|
||||
namespace td {
|
||||
|
||||
const CSlice DialogInviteLink::INVITE_LINK_URLS[3] = {"t.me/joinchat/", "telegram.me/joinchat/",
|
||||
"telegram.dog/joinchat/"};
|
||||
const CSlice DialogInviteLink::INVITE_LINK_URLS[12] = {
|
||||
"t.me/joinchat/", "telegram.me/joinchat/", "telegram.dog/joinchat/",
|
||||
"t.me/+", "telegram.me/+", "telegram.dog/+",
|
||||
"t.me/ ", "telegram.me/ ", "telegram.dog/ ",
|
||||
"t.me/%20", "telegram.me/%20", "telegram.dog/%20"};
|
||||
|
||||
DialogInviteLink::DialogInviteLink(tl_object_ptr<telegram_api::chatInviteExported> exported_invite) {
|
||||
if (exported_invite == nullptr) {
|
||||
|
@ -34,7 +34,7 @@ class DialogInviteLink {
|
||||
|
||||
friend StringBuilder &operator<<(StringBuilder &string_builder, const DialogInviteLink &invite_link);
|
||||
|
||||
static const CSlice INVITE_LINK_URLS[3];
|
||||
static const CSlice INVITE_LINK_URLS[12];
|
||||
|
||||
public:
|
||||
DialogInviteLink() = default;
|
||||
|
Loading…
Reference in New Issue
Block a user