Commit Graph
4 Commits
Author SHA1 Message Date
Marcelo C. a203de90e1 Added support for Topic ID on Telegram
This adds support for TopicID as specified in parameter "send-telegram-topid-id" which allows the messages to be organized in topics on a group.

Finding out your topic ID in a group can be rather tricky the easiest way is to use curl to create it.

```bash
export CHAT_ID="-99999999"
export TOPIC_NAME="Your Topic"
export BOT_TOKEN="7777777777:AAAAAAAAA-4WwwwwwwwwwwwwwwwwwwwwwwQ"

curl -X POST \
    -H "Content-Type: application/json" \
    -d "{\"chat_id\":\"$CHAT_ID\",\"name\":\"$TOPIC_NAME\"}" \
    https://api.telegram.org/bot$BOT_TOKEN/createForumTopic
```
Which will response with a json where message_thread_id is the Topic ID
```bash
{"ok":true,"result":{"message_thread_id":33,"name":.....
```
2025-02-03 11:05:27 -03:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Marcelo Ceccon 28414dd744 Fix to telegram notification
Fixes the Telegram notification to use the correct API URL and to send the message in chunks if it is too long.

Will add this to the documentation.

First create your telegram bot by messaging the @BotFather

For more information https://core.telegram.org/bots

Once you have created your bot you will have a bot token.

Now on the bot channel, send one message, “Hello”. This is important because the bot cannot initiate a conversation, it can only respond, so therefore that is the only way to obtain the chatId which needs to be configured on Duplicati.

Now on a browser or curl, access:

https://api.telegram.org/botYOURBOTTOKEN/getUpdates

Look for the property

"chat":{"id”:111122233,

One way to get that with curl is:

BOT_TOKEN="YOURBOTTOKEN" curl -s "https://api.telegram.org/bot$BOT_TOKEN/getUpdates" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2
2024-11-07 14:57:23 +01:00
Kenneth Skovhede 1dc03ea0cf Add Telegram reporting module. 2024-08-15 13:12:34 +02:00