Add missing Telegram WebApp API classes and fields (#1424) (#1425)

* Add missing Telegram WebApp API classes and fields (#1424)

* Implemented `WebAppChat` class with fields `id`, `type`, `title`, `username`, and `photo_url` as per Telegram documentation.
* Modified `WebAppUser` class by adding `is_premium`, `added_to_attachment_menu`, and `allows_write_to_pm` fields.
* Modified `WebAppInitData` class to include `chat`, `chat_type`, `chat_instance` fields for full API support.

* fix changelog file name

* fix line too long
This commit is contained in:
Kostiantyn Kriuchkov 2024-02-26 02:13:32 +02:00 committed by GitHub
parent a37deff396
commit a585fb08de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 56 additions and 0 deletions

View file

@ -20,6 +20,14 @@ class TestWebApp:
"&hash=46d2ea5e32911ec8d30999b56247654460c0d20949b6277af519e76271182803",
True,
],
[
"42:TEST",
"auth_date=1650385342"
"&user=%7B%22id%22%3A+%22123456789%22%2C+%22first_name%22%3A+%22PlaceholderFirstName%22%2C+%22last_name%22%3A+%22PlaceholderLastName+%5Cud83c%5Cuddfa%5Cud83c%5Cudde6%22%2C+%22username%22%3A+%22Latand%22%2C+%22language_code%22%3A+%22en%22%2C+%22is_premium%22%3A+%22true%22%2C+%22allows_write_to_pm%22%3A+%22true%22%7D"
"&query_id=test"
"&hash=b3c8b293f14ad0f7f0abcf769aea1209a72295d30a87eb0e74df855d32e53bfe",
True,
],
[
"42:INVALID",
"auth_date=1650385342"