From af1c5af8e81836e974e6ff2162b47cc9203b602c Mon Sep 17 00:00:00 2001
From: GitHub Action
Telegram allows sending polls and quizzes, that can be voted on by thousands, if not millions of users in chats and channels.
+Channels, legacy groups and supergroups may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.
How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.
Telegram allows sending polls and quizzes, that can be voted on by thousands, if not millions of users in chats and channels.
+Channels, legacy groups and supergroups may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.
How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.
chats
field of the result will have two objects:
All users of the chat will receive an updateNewMessage from the old chat with a messageService containing a messageActionChatMigrateTo constructor.
All new messages have to be sent to the new supergroup.
When working with migrated groups clients need to handle loading of the message history (as well as search results et cetera) from both the legacy group and the new supergroup. This is done by merging the two messages lists (requested with different Peer values) client side.
+Channels, legacy groups and supergroups may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.
+For more info on how to work with public usernames, invite links and join requests, see here ».
Channels, legacy groups and supergroups allow setting granular permissions both for admins and specific users; channels, supergroups and legacy groups also allow setting global granular permissions for users.
For more info on how to set and modify rights, see here ».
diff --git a/data/corefork.telegram.org/api/entities.html b/data/corefork.telegram.org/api/entities.html index f07a6e1748..7bf2318651 100644 --- a/data/corefork.telegram.org/api/entities.html +++ b/data/corefork.telegram.org/api/entities.html @@ -61,7 +61,8 @@ codeA number of other entities are also available, see the type page for the full list ».
diff --git a/data/corefork.telegram.org/api/invites.html b/data/corefork.telegram.org/api/invites.html new file mode 100644 index 0000000000..4469cb2967 --- /dev/null +++ b/data/corefork.telegram.org/api/invites.html @@ -0,0 +1,215 @@ + + + + +Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.
+boolFalse#bc799737 = Bool;
+boolTrue#997275b5 = Bool;
+
+contacts.resolvedPeer#7f077ad9 peer:Peer chats:Vector<Chat> users:Vector<User> = contacts.ResolvedPeer;
+
+---functions---
+
+contacts.resolveUsername#f93ccba3 username:string = contacts.ResolvedPeer;
+channels.joinChannel#24b524c5 channel:InputChannel = Updates;
+
+channels.checkUsername#10e6bd2c channel:InputChannel username:string = Bool;
+channels.updateUsername#3514b3de channel:InputChannel username:string = Bool;
+Only supergroups and channels may have a public usernames: normal groups must be migrated to a supergroup before they can be assigned a username, see the migration docs » for more info.
+channels.updateUsername can be used to directly assign or change the public username of a supergroup or channel.
+You can use channels.checkUsername before assigning the username to make sure that the specified username is valid and available.
channels.joinChannel can be used to join a supergroup or channel using peer information obtained using contacts.resolveUsername.
+chatInviteExported#ab4a819 flags:# revoked:flags.0?true permanent:flags.5?true request_needed:flags.6?true link:string admin_id:long date:int start_date:flags.4?int expire_date:flags.1?int usage_limit:flags.2?int usage:flags.3?int requested:flags.7?int title:flags.8?string = ExportedChatInvite;
+
+messages.exportedChatInvites#bdc62dcc count:int invites:Vector<ExportedChatInvite> users:Vector<User> = messages.ExportedChatInvites;
+
+messages.exportedChatInvite#1871be50 invite:ExportedChatInvite users:Vector<User> = messages.ExportedChatInvite;
+messages.exportedChatInviteReplaced#222600ef invite:ExportedChatInvite new_invite:ExportedChatInvite users:Vector<User> = messages.ExportedChatInvite;
+
+
+chatInviteImporter#8c5adfd9 flags:# requested:flags.0?true user_id:long date:int about:flags.2?string approved_by:flags.1?long = ChatInviteImporter;
+
+messages.chatInviteImporters#81b6b00a count:int importers:Vector<ChatInviteImporter> users:Vector<User> = messages.ChatInviteImporters;
+
+
+chatAdminWithInvites#f2ecef23 admin_id:long invites_count:int revoked_invites_count:int = ChatAdminWithInvites;
+
+messages.chatAdminsWithInvites#b69b72d7 admins:Vector<ChatAdminWithInvites> users:Vector<User> = messages.ChatAdminsWithInvites;
+
+chatInviteAlready#5a686d7c chat:Chat = ChatInvite;
+chatInvite#300c44c1 flags:# channel:flags.0?true broadcast:flags.1?true public:flags.2?true megagroup:flags.3?true request_needed:flags.6?true title:string about:flags.5?string photo:Photo participants_count:int participants:flags.4?Vector<User> = ChatInvite;
+chatInvitePeek#61695cb0 chat:Chat expires:int = ChatInvite;
+
+---functions---
+
+messages.exportChatInvite#a02ce5d5 flags:# legacy_revoke_permanent:flags.2?true request_needed:flags.3?true peer:InputPeer expire_date:flags.0?int usage_limit:flags.1?int title:flags.4?string = ExportedChatInvite;
+
+messages.getExportedChatInvites#a2b5a3f6 flags:# revoked:flags.3?true peer:InputPeer admin_id:InputUser offset_date:flags.2?int offset_link:flags.2?string limit:int = messages.ExportedChatInvites;
+messages.getExportedChatInvite#73746f5c peer:InputPeer link:string = messages.ExportedChatInvite;
+
+messages.editExportedChatInvite#bdca2f75 flags:# revoked:flags.2?true peer:InputPeer link:string expire_date:flags.0?int usage_limit:flags.1?int request_needed:flags.3?Bool title:flags.4?string = messages.ExportedChatInvite;
+
+messages.deleteRevokedExportedChatInvites#56987bd5 peer:InputPeer admin_id:InputUser = Bool;
+messages.deleteExportedChatInvite#d464a42b peer:InputPeer link:string = Bool;
+
+messages.getAdminsWithInvites#3920e6ef peer:InputPeer = messages.ChatAdminsWithInvites;
+messages.getChatInviteImporters#df04dd4e flags:# requested:flags.0?true peer:InputPeer link:flags.1?string q:flags.2?string offset_date:int offset_user:InputUser limit:int = messages.ChatInviteImporters;
+
+messages.checkChatInvite#3eadb1bb hash:string = ChatInvite;
+messages.importChatInvite#6c50051c hash:string = Updates;
+Private invite links can optionally have an expiration date, a usage limit, and can even be set to only allow users into the channel, supergroup or group upon explicit approval of an admin: see join requests » for more info.
+Invite links match the following regex: @(?:t|telegram)\.(?:me|dog)/(joinchat/|\+)?([\w-]+)@i
.
+The first matching group can be passed to the hash
parameter of messages.checkChatInvite to get info about the chat, and messages.importChatInvite to join the chat.
+messages.checkChatInvite may return chatInvitePeek, in which case the user may directly use to fetch chat messages until the time indicate by the expires
unixtime field.
Newly created groups, supergroups and channel already have a default invite link.
+To generate a new one, use messages.exportChatInvite.
+To get info about existing chat invites, optionally filtering only links created by a given admin, use messages.getExportedChatInvites; messages.getExportedChatInvite can be used to obtain info about a specific invite link.
messages.editExportedChatInvite is used to edit or revoke existing invite links: revoked links cannot be used by users to join the group, but info about revoked links can still be fetched using messages.getExportedChatInvites with the revoke
flag set.
+Use messages.deleteExportedChatInvite to permanently remove an invite link, and messages.deleteRevokedExportedChatInvites to permanently remove a revoked invite link.
messages.getChatInviteImporters can be used to fetch info about users that joined using a specific invite link.
+Some basic stats about the number of invite links generated by a given admin can be fetched using messages.getAdminsWithInvites.
+chatInvite#300c44c1 flags:# channel:flags.0?true broadcast:flags.1?true public:flags.2?true megagroup:flags.3?true request_needed:flags.6?true title:string about:flags.5?string photo:Photo participants_count:int participants:flags.4?Vector<User> = ChatInvite;
+
+updatePendingJoinRequests#7063c3db peer:Peer requests_pending:int recent_requesters:Vector<long> = Update;
+updateBotChatInviteRequester#11dfa986 peer:Peer date:int user_id:long about:string invite:ExportedChatInvite qts:int = Update;
+
+messages.chatInviteImporters#81b6b00a count:int importers:Vector<ChatInviteImporter> users:Vector<User> = messages.ChatInviteImporters;
+
+peerSettings#a518110d flags:# report_spam:flags.0?true add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true need_contacts_exception:flags.4?true report_geo:flags.5?true autoarchived:flags.7?true invite_members:flags.8?true request_chat_broadcast:flags.10?true geo_distance:flags.6?int request_chat_title:flags.9?string request_chat_date:flags.9?int = PeerSettings;
+
+messageActionChatJoinedByRequest#ebbca3cb = MessageAction;
+
+channelAdminLogEventActionParticipantJoinByRequest#afb6144a invite:ExportedChatInvite approved_by:long = ChannelAdminLogEventAction;
+
+---functions---
+
+messages.checkChatInvite#3eadb1bb hash:string = ChatInvite;
+messages.importChatInvite#6c50051c hash:string = Updates;
+
+messages.getChatInviteImporters#df04dd4e flags:# requested:flags.0?true peer:InputPeer link:flags.1?string q:flags.2?string offset_date:int offset_user:InputUser limit:int = messages.ChatInviteImporters;
+
+messages.hideChatJoinRequest#7fe7e815 flags:# approved:flags.0?true peer:InputPeer user_id:InputUser = Updates;
+messages.hideAllChatJoinRequests#e085f4ea flags:# approved:flags.0?true peer:InputPeer link:flags.1?string = Updates;
+If the request_needed
flag is set when generating or editing an invite link, users importing the invite link using messages.importChatInvite will receive an INVITE_REQUEST_SENT
RPC error, indicating that an join request was successfully sent to the chat admins.
Bot administrators will receive a updateBotChatInviteRequester update for each separate join request.
+User administrators will receive an updatePendingJoinRequests, and should invoke messages.getChatInviteImporters with the requested
flag set to obtain a list of users waiting to be admitted into the group.
Administrators can then use messages.hideChatJoinRequest to approve or dismiss a join request, and messages.hideAllChatJoinRequests to approve or dismiss in bulk multiple join requests.
+Administrators can also choose to message the user before admitting them into the group: in this case, graphical clients on the user side should display a message on the dialog bar of the chat with the admin, indicating that the chat was initiated by the admin of a chat/channel they have recently requested to join, according to the information contained in the peerSettings ».
Join requests, delete by date, global chat themes, hyper-speed scrolling and calendar view for shared media, sponsored channel posts.
+Join requests, delete by date, global chat themes, hyper-speed scrolling and calendar view for shared media, sponsored channel posts.
When the user confirms your request by pressing the 'Authorize' button, the MTProto API sends an updateNewMessage from the user, with a messageService constructor, containing a messageActionSecureValuesSentMe constructor that contains the encrypted Telegram Passport data.
+When the user confirms your request by pressing the "Authorize" button, the MTProto API sends an updateNewMessage from the user, with a messageService constructor, containing a messageActionSecureValuesSentMe constructor that contains the encrypted Telegram Passport data.
secureCredentialsEncrypted#33f0ea47 data:bytes hash:bytes secret:bytes = SecureCredentialsEncrypted;
diff --git a/data/corefork.telegram.org/bots/api.html b/data/corefork.telegram.org/bots/api.html
index c3f4bd269e..68e17c8da2 100644
--- a/data/corefork.telegram.org/bots/api.html
+++ b/data/corefork.telegram.org/bots/api.html
@@ -8153,7 +8153,7 @@ No more than 50 results per query are allowed.
error_message
String
Optional
-Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
+Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable"). Telegram will display this message to the user.
diff --git a/data/corefork.telegram.org/constructor/channelFull.html b/data/corefork.telegram.org/constructor/channelFull.html
index 5a77a9f10f..deab799b94 100644
--- a/data/corefork.telegram.org/constructor/channelFull.html
+++ b/data/corefork.telegram.org/constructor/channelFull.html
@@ -266,7 +266,7 @@
requests_pending
flags.28?int
-Pending join requests
+Pending join requests »
recent_requesters
diff --git a/data/corefork.telegram.org/constructor/chatFull.html b/data/corefork.telegram.org/constructor/chatFull.html
index d59ee17cfa..83c520df80 100644
--- a/data/corefork.telegram.org/constructor/chatFull.html
+++ b/data/corefork.telegram.org/constructor/chatFull.html
@@ -146,7 +146,7 @@
requests_pending
flags.17?int
-Pending join requests
+Pending join requests »
recent_requesters
diff --git a/data/corefork.telegram.org/constructor/chatInvite.html b/data/corefork.telegram.org/constructor/chatInvite.html
index de3ef1585c..daab383398 100644
--- a/data/corefork.telegram.org/constructor/chatInvite.html
+++ b/data/corefork.telegram.org/constructor/chatInvite.html
@@ -91,7 +91,7 @@
request_needed
flags.6?true
-Whether the join request must be first approved by an administrator
+Whether the join request » must be first approved by an administrator
title
diff --git a/data/corefork.telegram.org/constructor/chatInviteImporter.html b/data/corefork.telegram.org/constructor/chatInviteImporter.html
index 2c5b7ddbb9..300a3e953a 100644
--- a/data/corefork.telegram.org/constructor/chatInviteImporter.html
+++ b/data/corefork.telegram.org/constructor/chatInviteImporter.html
@@ -71,7 +71,7 @@
requested
flags.0?true
-Whether this user currently has a pending join request
+Whether this user currently has a pending join request »
user_id
@@ -91,7 +91,7 @@
approved_by
flags.1?long
-The administrator that approved the join request of the user
+The administrator that approved the join request » of the user
diff --git a/data/corefork.telegram.org/constructor/peerSettings.html b/data/corefork.telegram.org/constructor/peerSettings.html
index a47b338cad..c2c906bdd5 100644
--- a/data/corefork.telegram.org/constructor/peerSettings.html
+++ b/data/corefork.telegram.org/constructor/peerSettings.html
@@ -111,7 +111,7 @@
request_chat_broadcast
flags.10?true
-This flag is set if request_chat_title
and request_chat_date
fields are set and the join request is related to a channel (otherwise if only the request fields are set, the join request is related to a chat).
+This flag is set if request_chat_title
and request_chat_date
fields are set and the join request » is related to a channel (otherwise if only the request fields are set, the join request » is related to a chat).
geo_distance
@@ -126,7 +126,7 @@
request_chat_date
flags.9?int
-If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the timestamp when the join request was sent.
+If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the timestamp when the join request » was sent.
diff --git a/data/corefork.telegram.org/constructor/updateBotChatInviteRequester.html b/data/corefork.telegram.org/constructor/updateBotChatInviteRequester.html
index 5b979184ad..f6e2f8fadd 100644
--- a/data/corefork.telegram.org/constructor/updateBotChatInviteRequester.html
+++ b/data/corefork.telegram.org/constructor/updateBotChatInviteRequester.html
@@ -71,7 +71,7 @@
date
int
-When was the join request made
+When was the join request » made
user_id
@@ -86,7 +86,7 @@
invite
ExportedChatInvite
-Chat invite link that was used by the user to send the join request
+Chat invite link that was used by the user to send the join request »
qts
diff --git a/data/corefork.telegram.org/constructor/updatePendingJoinRequests.html b/data/corefork.telegram.org/constructor/updatePendingJoinRequests.html
index 8adbe4f727..4b3881498b 100644
--- a/data/corefork.telegram.org/constructor/updatePendingJoinRequests.html
+++ b/data/corefork.telegram.org/constructor/updatePendingJoinRequests.html
@@ -71,7 +71,7 @@
requests_pending
int
-Number of pending join requests for the chat or channel
+Number of pending join requests » for the chat or channel
recent_requesters
diff --git a/data/corefork.telegram.org/method/messages.getChatInviteImporters b/data/corefork.telegram.org/method/messages.getChatInviteImporters
index 6087b41c5c..4a11480481 100644
--- a/data/corefork.telegram.org/method/messages.getChatInviteImporters
+++ b/data/corefork.telegram.org/method/messages.getChatInviteImporters
@@ -73,7 +73,7 @@
requested
flags.0?true
-If set, only returns info about users with pending join requests
+If set, only returns info about users with pending join requests »
peer
@@ -88,7 +88,7 @@
q
flags.2?string
-Search for a user in the pending join requests list: only available when the requested
flag is set, cannot be used together with a specific link
.
+Search for a user in the pending join requests » list: only available when the requested
flag is set, cannot be used together with a specific link
.
offset_date
diff --git a/data/corefork.telegram.org/method/messages.hideAllChatJoinRequests b/data/corefork.telegram.org/method/messages.hideAllChatJoinRequests
index 40f09d0a73..ac7a0281d6 100644
--- a/data/corefork.telegram.org/method/messages.hideAllChatJoinRequests
+++ b/data/corefork.telegram.org/method/messages.hideAllChatJoinRequests
@@ -39,7 +39,7 @@
messages.hideAllChatJoinRequests
- Dismiss or approve all join requests related to a specific chat or channel
+ Dismiss or approve all join requests » related to a specific chat or channel
-
@@ -79,7 +79,7 @@
approved
flags.0?true
-Whether to dismiss or approve all chat join requests
+Whether to dismiss or approve all chat join requests »
peer
@@ -89,7 +89,7 @@
link
flags.1?string
-Only dismiss or approve join requests initiated using this invite link
+Only dismiss or approve join requests » initiated using this invite link
diff --git a/data/corefork.telegram.org/method/messages.hideChatJoinRequest b/data/corefork.telegram.org/method/messages.hideChatJoinRequest
index 0f778d2844..c4f79457e9 100644
--- a/data/corefork.telegram.org/method/messages.hideChatJoinRequest
+++ b/data/corefork.telegram.org/method/messages.hideChatJoinRequest
@@ -39,7 +39,7 @@
messages.hideChatJoinRequest
- Dismiss or approve a chat join request related to a specific chat or channel
+ Dismiss or approve a chat join request » related to a specific chat or channel
-
@@ -79,7 +79,7 @@
approved
flags.0?true
-Whether to dismiss or approve the chat join request
+Whether to dismiss or approve the chat join request »
peer
@@ -89,7 +89,7 @@
user_id
InputUser
-The user whose join request should be dismissed or approved
+The user whose join request » should be dismissed or approved
diff --git a/data/corefork.telegram.org/methods.html b/data/corefork.telegram.org/methods.html
index 4b7961faa7..6548670580 100644
--- a/data/corefork.telegram.org/methods.html
+++ b/data/corefork.telegram.org/methods.html
@@ -744,11 +744,11 @@
messages.hideChatJoinRequest
-Dismiss or approve a chat join request related to a specific chat or channel
+Dismiss or approve a chat join request related to a specific chat or channel
messages.hideAllChatJoinRequests
-Dismiss or approve all join requests related to a specific chat or channel
+Dismiss or approve all join requests related to a specific chat or channel
messages.migrateChat
diff --git a/data/corefork.telegram.org/passport.html b/data/corefork.telegram.org/passport.html
index 1e86ce5c0b..b182a7372a 100644
--- a/data/corefork.telegram.org/passport.html
+++ b/data/corefork.telegram.org/passport.html
@@ -379,7 +379,7 @@ This is just a list of data types that can be requested, and the encrypted objec
PassportFile
This object represents a PassportFile related to a document. The file is up to 10 MB in size and in the .jpg format.
Receiving information
-When the user confirms your request by pressing the 'Authorize' button, the Bot API sends an Update with the field passport_data to the bot that contains encrypted Telegram Passport data.
+When the user confirms your request by pressing the "Authorize" button, the Bot API sends an Update with the field passport_data to the bot that contains encrypted Telegram Passport data.
Note that all base64-encoded fields should be decoded before use.
diff --git a/data/corefork.telegram.org/passport/sdk-javascript.html b/data/corefork.telegram.org/passport/sdk-javascript.html
index 39516c1cfc..0ec5339b52 100644
--- a/data/corefork.telegram.org/passport/sdk-javascript.html
+++ b/data/corefork.telegram.org/passport/sdk-javascript.html
@@ -177,7 +177,7 @@
}, false);
</script>
Receiving information
-When the user confirms your request by pressing the 'Authorize' button, it will be redirected to the URL specified in the callback_url with the parameter tg_passport=success
and the Bot API will send the bot an Update with the field passport_data which contains encrypted Telegram Passport data.
+When the user confirms your request by pressing the "Authorize" button, it will be redirected to the URL specified in the callback_url with the parameter tg_passport=success
and the Bot API will send the bot an Update with the field passport_data which contains encrypted Telegram Passport data.
If the user cancels your request, it will be redirected to the URL specified in the callback_url with the parameter tg_passport=cancel
.
If an error occurs during the request, the user will be redirected to the URL specified in the callback_url with the parameter tg_passport=error
. The parameter error
will contain one of the following values: BOT_INVALID, PUBLIC_KEY_REQUIRED, PUBLIC_KEY_INVALID, SCOPE_EMPTY, NONCE_EMPTY.
diff --git a/data/corefork.telegram.org/type/Updates.html b/data/corefork.telegram.org/type/Updates.html
index 171528f43f..88c77210b5 100644
--- a/data/corefork.telegram.org/type/Updates.html
+++ b/data/corefork.telegram.org/type/Updates.html
@@ -439,11 +439,11 @@
messages.hideChatJoinRequest
-Dismiss or approve a chat join request related to a specific chat or channel
+Dismiss or approve a chat join request » related to a specific chat or channel
messages.hideAllChatJoinRequests
-Dismiss or approve all join requests related to a specific chat or channel
+Dismiss or approve all join requests » related to a specific chat or channel
messages.toggleNoForwards