mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-10-01 18:25:06 -04:00
PLG: telegram cleanup
This commit is contained in:
1 parent
d8e8939a37
commit
123fe320e8
1 file changed
+1
-1
@@ -89,7 +89,7 @@ def send(text):
|
||||
# never exceeds TELEGRAM_SIZE.
|
||||
truncation_marker = " (text was truncated)"
|
||||
if len(text) > limit:
|
||||
payload_data = text[:max(0, limit - len(truncation_marker))] + truncation_marker
|
||||
payload_data = (text[:max(0, limit - len(truncation_marker))] + truncation_marker)[:limit]
|
||||
else:
|
||||
payload_data = text
|
||||
|
||||
|
||||
Reference in new issue
Block a user