-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Describe the bug
I get this error when I have too many containers that need updating or fail:
Failed to send notification via shoutrrr (url=telegram://1234:AA1234BCDEF@telegram?channels=225533): message exceeds the max length
The problem is that Telegram does not support messages longer than 4096 characters
Possible solution
A simple fix would be to split the message once it reaches 4096 characters (preferably when there is a newline before the 4096 character, to have it cleaner to see).
To avoid problems with Telegram, you could send a warning message if it is longer than 20(?) messages (4096 * 20 characters), saying that it is impossible to send all notifications because they are too long to display in Telegram, is better than not receiving a warning at all.
To Reproduce
Steps to reproduce the behavior:
- Create many containers that need to be updated in order to have a long message
- Wait for the watchtower update check
- See error
Expected behavior
Receive notifications on Telegram when a message is too long
Environment
I am using containrrr/watchtower:latest image (arm64).
Docker version 20.10.12, build e91ed57