From 1f3015393cf447a86b484989617b2a078f124250 Mon Sep 17 00:00:00 2001
From: GitHub Action
Then, use messages.toggleBotInAttachMenu to enable or disable the attachment menu.
Changes made using this method will trigger an updateAttachMenuBots update in other clients, which should trigger a messages.getAttachMenuBots call to fetch the full updated list of installed attachment menu entries.
Once an attachment menu is enabled, the user.attach_menu_enabled
flag of the bot will be set, and the attachMenuBot.inactive
flag will be unset.
Once an attachment menu is enabled for a certain user, the user.attach_menu_enabled
flag will be set for the bot, and the attachMenuBot.inactive
flag will be unset.
UTF-16 is used when computing the length and offsets of entities in the MTProto and bot APIs, by counting the number of UTF-16 code units (not code points).
U+0000
to U+FFFF
) count as 1, because they are encoded into a single UTF-16 code unitsU+0000
to U+FFFF
) count as 1, because they are encoded into a single UTF-16 code unitA simple, but not very efficient way of computing the entity length is converting the text to UTF-16, and then taking the byte length divided by 2 (=number of UTF-16 code units).
diff --git a/data/web/corefork.telegram.org/api/errors.html b/data/web/corefork.telegram.org/api/errors.html index e41ea57744..56c19e1b63 100644 --- a/data/web/corefork.telegram.org/api/errors.html +++ b/data/web/corefork.telegram.org/api/errors.html @@ -49,7 +49,7 @@A string literal in the form of /[A-Z_0-9]+/
, which summarizes the problem. For example, AUTH_KEY_UNREGISTERED
. This is an optional parameter.
A full machine-readable JSON list of RPC errors that can be returned by all methods in the API can be found here », what follows is a description of its fields:
+A full machine-readable JSON list of RPC errors that can be returned by all methods in the API can be found here », what follows is a description of its fields:
errors
- All error messages and codes for each method (object).An exception to this is the AUTH_KEY_DUPLICATED
error, which is only emitted if any of the non-media DC detects that an authorized session is sending requests in parallel from two separate TCP connections, from the same or different IP addresses.
Note that parallel connections are still allowed and actually recommended for media DCs.
Also note that by session we mean a logged-in session identified by an authorization constructor, fetchable using account.getAuthorizations, not an MTProto session.
After receiving an AUTH_KEY_DUPLICATED
error, the session will be invalidated by the server and the user will be forced to login again.
If the client receives an AUTH_KEY_DUPLICATED
error, the session is already invalidated by the server and the user must log out, generate a new auth key and login again.
The maximum allowed number of attempts to invoke the given method with the given input parameters has been exceeded. For example, in an attempt to request a large number of text messages (SMS) for the same phone number.
Telegram apps support generating, sharing and synchronizing chat backgrounds.
Wallpapers must be rendered according to the instructions contained in the wallpaper constructors.
-Scheme:
-inputWallPaper#e630b979 id:long access_hash:long = InputWallPaper;
-inputWallPaperSlug#72091c80 slug:string = InputWallPaper;
-inputWallPaperNoFile#967a462e id:long = InputWallPaper;
-
-account.wallPapersNotModified#1c199183 = account.WallPapers;
-account.wallPapers#cdc3858c hash:long wallpapers:Vector<WallPaper> = account.WallPapers;
-
-wallPaper#a437c3ed id:long flags:# creator:flags.0?true default:flags.1?true pattern:flags.3?true dark:flags.4?true access_hash:long slug:string document:Document settings:flags.2?WallPaperSettings = WallPaper;
-
-wallPaperSettings#1dc1bca4 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int second_background_color:flags.4?int third_background_color:flags.5?int fourth_background_color:flags.6?int intensity:flags.3?int rotation:flags.4?int = WallPaperSettings;
-
----functions---
-
-account.uploadWallPaper#dd853661 file:InputFile mime_type:string settings:WallPaperSettings = WallPaper;
-account.getWallPaper#fc8ddbea wallpaper:InputWallPaper = WallPaper;
-account.getMultiWallPapers#65ad71dc wallpapers:Vector<InputWallPaper> = Vector<WallPaper>;
-
-account.installWallPaper#feed5769 wallpaper:InputWallPaper settings:WallPaperSettings = Bool;
-account.saveWallPaper#6c5a5b37 wallpaper:InputWallPaper unsave:Bool settings:WallPaperSettings = Bool;
-account.getWallPapers#7967d36 hash:long = account.WallPapers;
-account.resetWallPapers#bb3b9804 = Bool;
There are three main wallpaper types:
settings
field describes the transforms that should be applied
If set, rotation
indicates clockwise rotation angle of the gradient, in degrees; 0-359. Must be always divisible by 45, default to 0 if not set.
wallPaperSettings#1dc1bca4 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int second_background_color:flags.4?int third_background_color:flags.5?int fourth_background_color:flags.6?int intensity:flags.3?int rotation:flags.4?int = WallPaperSettings;
-If the background_color
, second_background_color
, third_background_color
and optionally fourth_background_color
flags are set, the fill is made of a freeform gradient of the specified 3 or 4 RGB-24 colors.
If the background_color
, second_background_color
, third_background_color
and optionally fourth_background_color
flags are set, the fill is made of a freeform gradient of the specified 3 or 4 RGB-24 colors.
Scheme:
+inputWallPaper#e630b979 id:long access_hash:long = InputWallPaper;
+inputWallPaperSlug#72091c80 slug:string = InputWallPaper;
+inputWallPaperNoFile#967a462e id:long = InputWallPaper;
+
+account.wallPapersNotModified#1c199183 = account.WallPapers;
+account.wallPapers#cdc3858c hash:long wallpapers:Vector<WallPaper> = account.WallPapers;
+
+wallPaper#a437c3ed id:long flags:# creator:flags.0?true default:flags.1?true pattern:flags.3?true dark:flags.4?true access_hash:long slug:string document:Document settings:flags.2?WallPaperSettings = WallPaper;
+
+wallPaperSettings#1dc1bca4 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int second_background_color:flags.4?int third_background_color:flags.5?int fourth_background_color:flags.6?int intensity:flags.3?int rotation:flags.4?int = WallPaperSettings;
+
+---functions---
+
+account.uploadWallPaper#dd853661 file:InputFile mime_type:string settings:WallPaperSettings = WallPaper;
+account.getWallPaper#fc8ddbea wallpaper:InputWallPaper = WallPaper;
+account.getMultiWallPapers#65ad71dc wallpapers:Vector<InputWallPaper> = Vector<WallPaper>;
+
+account.installWallPaper#feed5769 wallpaper:InputWallPaper settings:WallPaperSettings = Bool;
+account.saveWallPaper#6c5a5b37 wallpaper:InputWallPaper unsave:Bool settings:WallPaperSettings = Bool;
+account.getWallPapers#7967d36 hash:long = account.WallPapers;
+account.resetWallPapers#bb3b9804 = Bool;
+wallPaperSettings#1dc1bca4 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int second_background_color:flags.4?int third_background_color:flags.5?int fourth_background_color:flags.6?int intensity:flags.3?int rotation:flags.4?int = WallPaperSettings;
+
+wallPaper#a437c3ed id:long flags:# creator:flags.0?true default:flags.1?true pattern:flags.3?true dark:flags.4?true access_hash:long slug:string document:Document settings:flags.2?WallPaperSettings = WallPaper;
+
+---functions---
+
+account.uploadWallPaper#dd853661 file:InputFile mime_type:string settings:WallPaperSettings = WallPaper;
+account.uploadWallPaper is used to upload image and pattern wallpapers.
+Fill wallpapers don't require uploading since they have no associated file, and a wallPaper constructor can directly be generated client-side, specifying id=0
.
Wallpapers can then be shared using a wallpaper deep link », and/or installed as specified here (image and pattern wallpapers only) ».
+inputWallPaper#e630b979 id:long access_hash:long = InputWallPaper;
+inputWallPaperSlug#72091c80 slug:string = InputWallPaper;
+
+wallPaper#a437c3ed id:long flags:# creator:flags.0?true default:flags.1?true pattern:flags.3?true dark:flags.4?true access_hash:long slug:string document:Document settings:flags.2?WallPaperSettings = WallPaper;
+
+wallPaperSettings#1dc1bca4 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int second_background_color:flags.4?int third_background_color:flags.5?int fourth_background_color:flags.6?int intensity:flags.3?int rotation:flags.4?int = WallPaperSettings;
+
+account.wallPapersNotModified#1c199183 = account.WallPapers;
+account.wallPapers#cdc3858c hash:long wallpapers:Vector<WallPaper> = account.WallPapers;
+
+---functions---
+
+account.getWallPaper#fc8ddbea wallpaper:InputWallPaper = WallPaper;
+account.getMultiWallPapers#65ad71dc wallpapers:Vector<InputWallPaper> = Vector<WallPaper>;
+
+account.saveWallPaper#6c5a5b37 wallpaper:InputWallPaper unsave:Bool settings:WallPaperSettings = Bool;
+account.installWallPaper#feed5769 wallpaper:InputWallPaper settings:WallPaperSettings = Bool;
+account.getWallPapers#7967d36 hash:long = account.WallPapers;
+account.resetWallPapers#bb3b9804 = Bool;
+Once you've uploaded your wallpaper or received a wallpaper deep link, it can be installed as follows.
+Note that fill wallpapers cannot be installed using the API, clients should install and keep track of them only locally, without synchronizing the wallpaper list or signalling installations.
+The API keeps a list of wallpapers that the user can set as chat background, including some preinstalled ones.
+To fetch this list use account.getWallPapers.
+To save a wallpaper to that list use account.saveWallPaper with unsave=false
.
+To remove a wallpaper (including preinstalled wallpapers) from the list use account.saveWallPaper with unsave=true
.
+To restore the default list, removing all installed wallpapers and reinstalling previously removed preinstalled wallpapers use account.resetWallPapers.
When a client sets a wallpaper as the default chat background, it should call account.installWallPaper to signal this installation to the server.
+In all cases where an InputWallPaper constructor is required, pass inputWallPaperSlug when working with wallpaper deep links and inputWallPaper otherwise, using the ID and access hash fields of a full wallPaper.
diff --git a/data/web/corefork.telegram.org/constructor/updateServiceNotification.html b/data/web/corefork.telegram.org/constructor/updateServiceNotification.html index a6f4e7cbeb..c994ef7a3c 100644 --- a/data/web/corefork.telegram.org/constructor/updateServiceNotification.html +++ b/data/web/corefork.telegram.org/constructor/updateServiceNotification.html @@ -75,7 +75,7 @@(auth.signIn "79991234567" "2dc02d2cda9e615c84" "44444")
-=
-(auth.authorization
- expires:1403938438
- user:(userSelf
- id:603177
- first_name:"John"
- last_name:"Doe"
- phone:"79991234567"
- photo:(userProfilePhotoEmpty)
- status:(userStatusEmpty)
- inactive:(boolTrue)
- )
-)
-
-bcd51581 3939370b 33323139 37363534 63643212 32643230 39616463 35313665 00343863 34343405 00003434 45ca2b3b
-=
-f6b673a4 53ae6686 720535ec 00093429 686f4a04 0000006e 656f4403 3939370b 33323139 37363534 4f11bae1 09d05049 997275b5 d8487410
Send the verification code for login
diff --git a/data/web/corefork.telegram.org/method/auth.signUp b/data/web/corefork.telegram.org/method/auth.signUp index bfc947f01a..906950f1b4 100644 --- a/data/web/corefork.telegram.org/method/auth.signUp +++ b/data/web/corefork.telegram.org/method/auth.signUp @@ -144,26 +144,7 @@(auth.signUp "79991234567" "2dc02d2cda9e615c84" "44444" "John" "Doe")
-=
-(auth.authorization
- expires:1403938438
- user:(userSelf
- id:603177
- first_name:"John"
- last_name:"Doe"
- phone:"79991234567"
- photo:(userProfilePhotoEmpty)
- status:(userStatusEmpty)
- inactive:(boolTrue)
- )
-)
-
-1b067634 3939370b 33323139 37363534 63643212 32643230 39616463 35313665 00343863 34343405 00003434 686f4a04 0000006e 656f4403 c18027ca
-=
-f6b673a4 53ae6686 720535ec 00093429 686f4a04 0000006e 656f4403 3939370b 33323139 37363534 4f11bae1 09d05049 997275b5 d8487410
+