fix(telegram): split long messages to avoid Message is too long error
Telegram has a 4096 character limit per message. This fix: - Splits messages longer than 4000 chars into multiple chunks - Prefers breaking at newline boundaries to preserve formatting - Falls back to space boundaries if no newlines available - Forces split at max length if no good boundaries exist - Adds comprehensive tests for message splitting logic
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -19,4 +19,4 @@ __pycache__/
|
||||
poetry.lock
|
||||
.pytest_cache/
|
||||
botpy.log
|
||||
tests/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user