* Allow for nested MessageEntities in Message._parse_markdown/html, adjust tests
* remove testing relict
* Use MessageEntitys new equality check (#1465)
* Remove unused variable
* Update to custom_title feature and slow_mode_delay option
Changes:
- custom_title for ChatMember
- new method setChatAdministratorCustomTitle for Bot
- new slow_mode_delay for Chat
Update due to new API future `custom_title` from API 4.5 (https://core.telegram.org/bots/api#december-31-2019)
* Minor typo fix
* Comply with Flake8
* Add new MessageEntities and MarkdownV2
* Added file_unique_id attrs from API 4.5 and updated tests for it
* Fixed test and checked using flake8
* Fixed ChatPhoto documentation
* Fix Flake8
* Add setChatAdminCstmTitle to Bot
* Rename MDV2 methods
* Change files id attrs to unique id
* correct id_attrs for chat_photo
* Revert "temporarily skip tests failing b/c missing api 4.5 (#1738)"
This reverts commit 7cde6ca268.
* Fix text_markdown_v2 for monospace and text_links
* closing remarks from pieter
* Minor fix in escape_markdown, improve tests for it
* Fix offset bug in Message._parse_*
* Add test_chatphoto.py
* remove debug print from test_message.py
* try making codecov happy
* Update readme
* all hail codecov
* Improve Link handling for MarkdownV1 and adjust tests. Closes#1654
* Dont use beginning of pre-entity as language in _parse_markdown
* Remove debug print
* Dummy commit to try fix codecov
Co-authored-by: Hoi Dmytro <dmytro.hoi@gmail.com>
Co-authored-by: Dmytro Hoi <code@dmytrohoi.com>
Co-authored-by: poolitzer <25934244+poolitzer@users.noreply.github.com>
* Update data.py to be compatible with example
for now, if you process personal_info with example code, then you got an error if there is no set option to get native fist and last name.
setting default value will allow to process personal_info without native name/surname transation
* fixing line length
i hope i understood right this. sorry for delay, just starting using github!
* Fix passport decryption failing at random times
Sometimes a decrypted secret was being treated as b64 and therefore got decoded even further. Fix by decoding b64 right before call to decrypt so we have better control of when not to do it
* Bot api 4.1
Telegram passport 1.1
Added support for middle names.
Added support for translations for documents
Add errors for translations for documents
Added support for requesting names in the language of the user's country of residence
Replaced the payload parameter with the new parameter nonce
NOTE: Scope stuff is NOT implemented, as we wanna STRONGLY encourage users to use the telegram provided SDKs anyway (and not generate telegram auth links in their bot, but rather on a server)
* Minor fixes
* Add hash to EncryptedPassportElement
For use with PassportElementErrorUnspecified apparently
Telegram Passport (#1174):
- Add full support for telegram passport.
- New types: PassportData, PassportFile, EncryptedPassportElement, EncryptedCredentials, PassportElementError, PassportElementErrorDataField, PassportElementErrorFrontSide, PassportElementErrorReverseSide, PassportElementErrorSelfie, PassportElementErrorFile and PassportElementErrorFiles.
- New bot method: set_passport_data_errors
- New filter: Filters.passport_data
- Field passport_data field on Message
- PassportData is automagically decrypted when you specify your private key when creating Updater or Bot.
- PassportFiles is also automagically decrypted as you download/retrieve them.
- See new passportbot.py example for details on how to use, or go to our telegram passport wiki page for more info
- NOTE: Passport decryption requires new dependency `cryptography`.
Inputfile rework (#1184):
- Change how Inputfile is handled internally
- This allows support for specifying the thumbnails of photos and videos using the thumb= argument in the different send_ methods.
- Also allows Bot.send_media_group to actually finally send more than one media.
- Add thumb to Audio, Video and Videonote
- Add Bot.edit_message_media together with InputMediaAnimation, InputMediaAudio, and inputMediaDocument.
Other Bot API 4.0 changes:
- Add forusquare_type to Venue, InlineQueryResultVenue, InputVenueMessageContent, and Bot.send_venue. (#1170)
- Add vCard support by adding vcard field to Contact, InlineQueryResultContact, InputContactMessageContent, and Bot.send_contact. (#1166)
- Support new message entities: CASHTAG and PHONE_NUMBER. (#1179)
- Cashtag seems to be things like $USD and $GBP, but it seems telegram doesn't currently send them to bots.
- Phone number also seems to have limited support for now
- Add Bot.send_animation, add width, height, and duration to Animation, and add Filters.animation. (#1172)
Co-authored-by: Jasmin Bom <jsmnbom@gmail.com>
Co-authored-by: code1mountain <32801117+code1mountain@users.noreply.github.com>
Co-authored-by: Eldinnie <pieter.schutz+github@gmail.com>
Co-authored-by: mathefreak1 <mathefreak@hi2.in>