Add support for MarkdownV2 formatting #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code now supports MarkdownV2 formatting. It properly handles large messages by intelligently splitting them while preserving Markdown formatting. It also splits messages at natural boundaries (such as newlines and words) whenever possible to avoid exceeding Telegram's message size limit. Each part of a split message is labeled with "(n/N)" at the top, making it easier to track the message parts. Additionally, the code includes a small delay between messages to prevent hitting Telegram's rate limits.
Please note that I am not a developer. In fact, this code was entirely written by Claude AI (because ChatGPT couldn't figure it out). I've tested it and it works for my use case, which is forwarding notifications from my Proxmox instance to Telegram.
I have built the plugin for Gotify V2.6.1 for AMD64, ARM7 and ARM64 platforms and added them as a release to my fork.