hass-core/homeassistant
r-xyz 0487b38ed3
Add support for sending telegram messages to topics (#112715)
* Add support for sending telegram messages to topics
    Based on original PR #104059 by [jgresty](https://github.com/jgresty).
    Did not manage to merge conflicts, so I remade the changes from scratch, including suggestions from previous PR reviews.

    Topics were added to telegram groups in November 2022, and to the
    telegram-bot library in version 20.0. They are a purely additive change
    that is exposed by a single parameter `message_thread_id`. Not passing
    this parameter will not change the behaviour from current.

    This same parameter is used to send messages to threads and messages to
    topics inside groups.

    https://telegram.org/blog/topics-in-groups-collectible-usernames/it?setln=en#topics-in-groups

    Fixes #81888
    Fixes #91750

* telegram_bot: add tests for threads feature.

* telegram_bot: fixed tests for threads.

* telegram_bot: fixed wrong line.

* Update test_telegram_bot.py

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-06-05 17:41:40 +02:00
..
auth Add ws endpoint to remove expiration date from refresh tokens (#117546) 2024-05-29 09:09:59 +02:00
backports Deprecated old backports and typing aliases (#114883) 2024-04-06 13:15:30 -10:00
brands Make Weatherflow a brand (#118785) 2024-06-04 13:40:48 +02:00
components Add support for sending telegram messages to topics (#112715) 2024-06-05 17:41:40 +02:00
generated Make Weatherflow a brand (#118785) 2024-06-04 13:40:48 +02:00
helpers Include script description in LLM exposed entities (#118749) 2024-06-04 11:18:07 -04:00
scripts Use PEP 695 for function annotations (3) (#117660) 2024-05-18 11:43:32 +02:00
util Update mypy-dev to 1.11.0a5 (#118519) 2024-06-02 15:28:24 +02:00
__init__.py
__main__.py Prevent shutdown fault-log trace-back (#116735) 2024-05-11 07:59:05 +02:00
block_async_io.py Add os.walk to asyncio loop blocking detection (#118769) 2024-06-04 06:53:37 +02:00
bootstrap.py Improve async_get_issue_tracker for custom integrations (#118016) 2024-05-24 09:55:05 +02:00
config.py Fix blocking I/O in the event loop when loading timezones (#117721) 2024-05-20 11:06:03 +02:00
config_entries.py Ensure config entries are not unloaded while their platforms are setting up (#118767) 2024-06-04 21:34:39 -04:00
const.py Bump version to 2024.7.0dev0 (#118399) 2024-05-29 20:54:49 +02:00
core.py Fix last_reported_timestamp not being updated when last_reported is changed (#118341) 2024-05-28 19:03:19 -10:00
data_entry_flow.py Rewrite flow handler to flow result conversion as a list comp (#118269) 2024-05-27 15:39:59 -10:00
exceptions.py Translate service validation errors (#115024) 2024-04-18 14:36:03 +02:00
loader.py Improve async_get_issue_tracker for custom integrations (#118016) 2024-05-24 09:55:05 +02:00
package_constraints.txt Update frontend to 20240605.0 (#118875) 2024-06-05 13:32:50 +02:00
py.typed Add py.typed file (#115446) 2024-04-11 22:14:10 -04:00
requirements.py Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
runner.py Ensure name of task is logged for unhandled loop exceptions (#118822) 2024-06-04 12:48:29 -04:00
setup.py Speed up async_get_loaded_integrations (#117851) 2024-05-21 09:08:49 -04:00
strings.json LLM Tools support for Google Generative AI integration (#117644) 2024-05-19 22:11:25 -04:00