Commit Graph
46 Commits
Author SHA1 Message Date
Re-bin 83433198ca Merge main into pr-436 2026-03-07 15:51:53 +00:00
Re-bin 515b3588af Merge main into pr-1482 2026-03-07 15:33:24 +00:00
Re-bin 369dbec70a Merge branch 'main' into pr-1535 2026-03-07 15:05:54 +00:00
Gleb 44327d6457 fix(telegram): added "stop" command handler, fixed stop command 2026-03-07 12:38:52 +02:00
Re-bin 0409d72579 feat(telegram): improve streaming UX and add table rendering 2026-03-06 16:19:19 +00:00
Re-bin 7e9616cbd3 merge origin/main into pr-1567 2026-03-06 06:51:28 +00:00
Re-bin d32c6f946c fix(telegram): pin ptb>=22.6, fix double progress, clean up stale hatch config 2026-03-05 15:17:30 +00:00
suger-m 323e5f22cc refactor(channels): extract split_message utility to reduce code duplication
Extract the _split_message function from discord.py and telegram.py
into a shared utility function in utils/helpers.py.

Changes:
- Add split_message() to nanobot/utils/helpers.py with configurable max_len
- Update Discord channel to use shared utility (2000 char limit)
- Update Telegram channel to use shared utility (4000 char limit)
- Remove duplicate implementations from both channels

Benefits:
- Reduces code duplication
- Centralizes message splitting logic for easier maintenance
- Makes the function reusable for future channels

The function splits content into chunks within max_len, preferring
to break at newlines or spaces rather than mid-word.
2026-03-05 17:16:47 +08:00
姚远 f78d655aba Fix: Telegram channel crash when proxy is configured 2026-03-05 04:29:00 +08:00
Sergio Sánchez Vallés ca1f41562c Fix telegram stop typing if not final message 2026-03-04 13:19:35 +01:00
Sergio Sánchez Vallés 102b9716ed feat: Implement Telegram draft/progress messages (streaming) 2026-03-03 17:16:08 +01:00
WufeiHalf 0f1cc40b22 feat(telegram): add Telegram group topic support 2026-03-03 22:08:01 +08:00
JK_Lu 977ca725f2 style: unify code formatting and import order
- Remove trailing whitespace and normalize blank lines
- Unify string quotes and line breaks for long lines
- Sort imports alphabetically across modules
2026-02-28 20:55:43 +08:00
Re-bin aa2987be3e refactor: streamline Telegram media-group buffering 2026-02-27 09:30:01 +00:00
Kim a3e0543eae chore(telegram): keep media-group fix without unrelated formatting changes 2026-02-27 12:16:51 +08:00
Kim aa774733ea fix(telegram): aggregate media-group images into a single inbound turn 2026-02-27 12:08:48 +08:00
Re-bin cdbede2fa8 refactor: simplify /stop dispatch, inline commands, trim verbose docstrings 2026-02-25 17:04:08 +00:00
Re-bin e1854c4373 feat: make Telegram reply-to-message behavior configurable, default false 2026-02-20 11:13:10 +00:00
Re-bin 44eb1bdca2 Merge branch 'main' into pr-815 2026-02-20 08:57:02 +00:00
Re-bin 2f315ec567 style: trim _on_help docstring 2026-02-20 08:39:26 +00:00
Re-bin 7957f84e3d Merge branch 'main' into pr-824 2026-02-20 08:36:34 +00:00
Re-bin 37252a4226 fix: complete loguru native formatting migration across all files 2026-02-20 07:55:34 +00:00
Nikolas de Hor 53b83a38e2 fix: use loguru native formatting to prevent KeyError on messages containing curly braces
Closes #857
2026-02-19 17:19:36 -03:00
Nikolas de Hor 33d760d312 fix: handle /help command directly in Telegram, bypassing ACL check
The /help command was routed through _forward_command → _handle_message
→ is_allowed(), which denied access to users not in the allowFrom list.
Since /help is purely informational, it should be accessible to all
users — similar to how /start already works with its own handler.

Add a dedicated _on_help handler that replies directly without going
through the message bus access control.

Closes #687
2026-02-18 21:31:11 -03:00
Darye 3ac5513004 If given a message_id to telegram provider send, the bot will try to reply to that message 2026-02-18 20:27:48 +01:00
Re-bin 5ad9c837df refactor: clean up telegram media sending logic 2026-02-17 10:37:55 +00:00
Darye 23b7e1ef5e Handle media files (voice messages, audio, images, documents) on Telegram Channel 2026-02-16 16:29:03 +01:00
Re-bin db0e8aa61b fix: handle Telegram message length limit with smart splitting 2026-02-16 12:39:39 +00:00
Re-bin 48a14edbda Merge branch 'main' into pr-694 2026-02-16 12:16:05 +00:00
Re-bin ffbb264a5d fix: consistent sender_id for Telegram command allowlist matching 2026-02-16 12:11:03 +00:00
Thomas Lisankie 51d22b7ef4 Fix: _forward_command now builds sender_id with username for allowlist matching 2026-02-16 00:14:34 -05:00
zhouzhuojie 9bfc86af41 refactor(telegram): extract message splitting into helper function
- Added _split_message() helper for cleaner separation of concerns
- Simplified send() method by using the helper
- Net -18 lines for the message splitting feature
2026-02-15 22:49:01 +00:00
zhouzhuojie 203aa154d4 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
2026-02-15 22:39:31 +00:00
Re-bin 903caaa642 feat: unified slash commands (/new, /help) across all channels 2026-02-13 03:30:21 +00:00
Re-bin b429bf9381 fix: improve long-running stability for various channels 2026-02-12 01:20:57 +00:00
eric 4d6f02ec0d fix(telegram): preserve file extension for generic documents 2026-02-09 21:12:16 -05:00
Re-bin 00185f2bee feat: add Telegram typing indicator 2026-02-08 05:44:06 +00:00
Re-bin f7f812a177 feat: add /reset and /help commands for Telegram bot 2026-02-08 05:06:41 +00:00
alan cf1663af13 feat: conditionally set telegram proxy 2026-02-07 22:18:43 +08:00
alan 3166c15cff feat: add telegram proxy support and add error handling for channel startup 2026-02-07 20:37:41 +08:00
Re-bin 8989adc9ae refactor: use explicit dependency injection for groq_api_key 2026-02-03 06:36:58 +00:00
Re-bin eb20cea668 resolve conflicts with main 2026-02-03 06:16:17 +00:00
codeLzqandRe-bin 1663acd1a1 feat: enhance sender ID handling in Telegram channel
- Update sender ID construction to prioritize user ID while maintaining username for allowlist compatibility.
- Improve allowlist checking in BaseChannel to support sender IDs with multiple parts separated by '|'.
2026-02-02 13:07:35 +00:00
Manus AI 42f62c0c1a feat: add voice transcription support with groq (fixes #13) 2026-02-02 04:33:26 -05:00
Re-bin d888e51d1c feat(telegram): markdown support 2026-02-01 18:35:27 +00:00
Re-bin d4cc48afd5 🐈nanobot: hello world! 2026-02-01 07:36:42 +00:00