Telegram: acquire a status of sending (success/failed)

Have no idea is it possible or not.

Example code:

telegram_bot:
  - platform: polling
    api_key: ...
    parse_mode: ...
    allowed_chat_ids:
      - xxxxxxxxx
...
notify:
  - platform: telegram
    name: telegram_xxx
    chat_id: xxxxxxxxx

Usage:

service: notify.telegram_xxx
data:
  message: hello

Scenario:

  1. User sent some message using “notify.telegram_xxx” service.
  2. Due to some reasons the message is not sent (at least not delivered).
  3. There is an error in Log like:
    2024-08-09 06:37:39.532 ERROR (MainThread) [homeassistant.components.telegram_bot] Error sending message: Timed out. Args: (-1009917799099, ‘…’), kwargs: {‘parse_mode’: <ParseMode.HTML>, ‘disable_web_page_preview’: False, ‘disable_notification’: False, ‘reply_to_message_id’: None, ‘reply_markup’: None, ‘read_timeout’: None, ‘message_thread_id’: None}

A desired behaviour:
There is a possibility to get a status of sending a message - “success/failed”.
Then, if “failed”, we can call the “notify.telegram_xxx” service again.

You might be able to catch the log message and react to it.

This is my current workaround - and a very cumbersome.
I need to re-send only faulty messages.