Commit graph

14 commits

Author SHA1 Message Date
KoenigMjr edf7a6afe8 [upd/telegram]: improve stability, safety and production robustness
Updated the Telegram plugin to handle high-load scenarios and prevent
resource exhaustion. Key focus areas were message formatting,
concurrency management, and configuration resilience.

- Implement bounded message queue (max 100) with non-blocking drops to prevent memory leaks
- Add graceful shutdown logic with worker thread joining and queue draining
- Add self-healing initialization (`_ensure_sender`) to handle race conditions during startup
- Implement robust escaping/sanitization for HTML and MarkdownV2 parse modes
- Enforce Telegram's 4096 character limit with graceful truncation
- Enhance error diagnostics for API responses (Rate limiting, 4xx/5xx errors)
- Validate and sanitize GPS coordinates (range and type checking)
- Decouple logging from global config by using module-level logger

Behavioral Changes:
- BREAKING: Location messages now require `coordinates: true` in config (previously default)
- Messages are dropped with an error log when the queue is full (prevents system hang)
- Invalid HTML/Markdown characters are now automatically escaped to prevent API errors
2026-01-19 09:34:13 +01:00
KoenigMjr c5015f2160 enh(telegram): parse_mode Unterstützung hinzugefügt
- Internationalisierung der Kommentare
- parse_mode hinzugefügt (für Formatierungsmöglichkeiten) mit Auswahlmöglichkeit "HTML" und "MarkdownV2"
- Ergänzung in Dokumentation
- kleinere Korrekturen in Dokumentation
- Dokumentation um die Möglichkeit von Block-Strings (|) ergänzt (Danke sm7tix für den Input!)
2025-11-18 20:49:27 +01:00
KoenigMjr 523329a9bb Doku-Ergänzung
update zur neuen Telegram Version

*in Konfiguration hinzugefügt:*
Startup_message
max_retries
initial_delay
max_delay

*gelöscht:*
queue

*im Beispiel:*
Startup_message hinzugefügt
2025-08-08 21:11:48 +02:00
Jan Speller b19d2e7eda Add Notice to documentation 2020-07-14 08:40:04 +02:00
Schrolli91 c94938dd3d
update docs 2020-05-01 23:52:38 +02:00
Jan Speller fc2b23891e change telegram docu for better understandability 2020-04-13 18:38:00 +02:00
Bastian Schroll 4903e52142
fix typo 2020-02-25 13:39:12 +01:00
Bastian Schroll 62f3f1aff1
some docu edits 2020-02-24 23:38:13 +01:00
Jan Speller 4d9bf5b126 threads 2020-02-24 22:35:30 +01:00
Jan Speller 9fb7fe9ea5 threads 2020-02-24 22:15:28 +01:00
Jan Speller 4b0614c7da threads and a few fixes to wildcards 2020-02-24 21:51:19 +01:00
Jan Speller a12af18b54 resolve threads (: 2020-02-22 22:53:03 +01:00
Jan Speller 4aea7b5d78 add geocoding module, resolve threads 2020-02-22 19:08:53 +01:00
Jan Speller 7b091fabe4 Add Telegram Plugin and Documentation 2020-02-18 22:12:53 +01:00