Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telegram: add topics support #1308

Merged
merged 5 commits into from
Dec 18, 2024
Merged

telegram: add topics support #1308

merged 5 commits into from
Dec 18, 2024

Conversation

crazy-max
Copy link
Owner

@crazy-max crazy-max commented Dec 18, 2024

fixes #948
closes #1125
closes #1305

Carry changes from #1125 but merge topics within chatIDs with a specific format and add tests.

cc @jon4hz @bytebone

@crazy-max crazy-max marked this pull request as ready for review December 18, 2024 20:06
@bytebone
Copy link

Looks good after a quick skim without doing my own tests. Thanks for doing the final steps, I'll happily close my PR and branch once this merges.

@crazy-max crazy-max merged commit 4db25fc into master Dec 18, 2024
32 checks passed
@crazy-max crazy-max deleted the telegram-topics branch December 19, 2024 00:00
@chris-1243
Copy link

sorry to jump in, since latest version (4.29.0), I have now this error and I am unable to use Telegram notification

diun: error: rpc error: code = Unknown desc = cannot parse chat IDs for Telegram notifier: invalid chat ID x.xxxxxxxxxe+09 (type=float64)

I guess it might be related to this PR. Any advices on how to solve the issue?

@bytebone
Copy link

diun: error: rpc error: code = Unknown desc = cannot parse chat IDs for Telegram notifier: invalid chat ID x.xxxxxxxxxe+09 (type=float64)

It might not have been made clear enough on the update - the telegram chat ID was changed from a number to a string. So you need to enclose it with double quotes in your config:

notif:
  telegram:
    token: aabbccdd:11223344
    chatIDs:
-      - 123456789
+      - "123456789"

More examples are in the docs. I hope this helps.

@chris-1243
Copy link

Thanks for your answer.

Effectively, double quotes are needed. I edited my secret file and now everything is working.

I would maybe edit this part of the documentation as double quotes are not used if you do not specify a target message topic.

Untitled

@crazy-max
Copy link
Owner Author

crazy-max commented Dec 20, 2024

@chris-1243 Do you have this issue through chatIDsFile or chatIDs option? It should be backward compatible with chatIDsFile but not chatIDs. I will add a note about this.

@chris-1243
Copy link

I had the issue through DIUN_NOTIF_TELEGRAM_CHATIDSFILE env variable in docker-compose.yaml.

I tried DIUN_NOTIF_TELEGRAM_CHATIDS and the same error was displayed.

In both case, the use of the double quotes is required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Telegram group topics
4 participants