mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-15 11:25:54 +00:00
Added full support of Bot API 7.2 (#1444)
* Added base support of Bot API 7.2 * Added base support of Bot API 7.2 * Fixing tests and content types for Telegram Bot API 7.2 update (#1453) * Fixing tests and content types for Telegram Bot API 7.2 * Adding changelog for 1453 PR * Fixes + coverage * Replace `BusinessConnection.date` type * Reformat code * Refactor UserContextMiddleware to use EventContext class This update significantly refactors UserContextMiddleware to leverage a new class, EventContext. Instead of resolving event context as a tuple, it now produces an instance of EventContext. Additional adjustments include supporting a business connection ID for event context identification and facilitating backwards compatibility. Tests and other files were also updated accordingly for these changes. * Cover FSM key builder (business_connection_id * Added changelog --------- Co-authored-by: RoLOQ <roman.fedunn@gmail.com>
This commit is contained in:
parent
5f157beb26
commit
057478621b
147 changed files with 3509 additions and 651 deletions
57
.butcher/types/SharedUser/entity.json
Normal file
57
.butcher/types/SharedUser/entity.json
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Available types",
|
||||
"anchor": "available-types"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "shareduser",
|
||||
"name": "SharedUser",
|
||||
"description": "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button.",
|
||||
"html_description": "<p>This object contains information about a user that was shared with the bot using a <a href=\"#keyboardbuttonrequestuser\">KeyboardButtonRequestUser</a> button.</p>",
|
||||
"rst_description": "This object contains information about a user that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.",
|
||||
"html_description": "<td>Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.</td>",
|
||||
"rst_description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.\n",
|
||||
"name": "user_id",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "First name of the user, if the name was requested by the bot",
|
||||
"html_description": "<td><em>Optional</em>. First name of the user, if the name was requested by the bot</td>",
|
||||
"rst_description": "*Optional*. First name of the user, if the name was requested by the bot\n",
|
||||
"name": "first_name",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Last name of the user, if the name was requested by the bot",
|
||||
"html_description": "<td><em>Optional</em>. Last name of the user, if the name was requested by the bot</td>",
|
||||
"rst_description": "*Optional*. Last name of the user, if the name was requested by the bot\n",
|
||||
"name": "last_name",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Username of the user, if the username was requested by the bot",
|
||||
"html_description": "<td><em>Optional</em>. Username of the user, if the username was requested by the bot</td>",
|
||||
"rst_description": "*Optional*. Username of the user, if the username was requested by the bot\n",
|
||||
"name": "username",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Array of PhotoSize",
|
||||
"description": "Available sizes of the chat photo, if the photo was requested by the bot",
|
||||
"html_description": "<td><em>Optional</em>. Available sizes of the chat photo, if the photo was requested by the bot</td>",
|
||||
"rst_description": "*Optional*. Available sizes of the chat photo, if the photo was requested by the bot\n",
|
||||
"name": "photo",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue