Commit Graph

230 Commits

Author SHA1 Message Date
Re-bin
2e50a98a57 merge main into pr-673 and keep slack empty-text fallback without regressing thread/media support 2026-03-07 16:51:48 +00:00
Re-bin
057927cd24 fix(auth): prevent allowlist bypass via sender_id token splitting 2026-03-07 16:36:12 +00:00
Re-bin
3e9c5aa34a merge main into pr-532 and keep qq msg_seq/startup behavior while adding group @message support with regression tests 2026-03-07 16:22:41 +00:00
Re-bin
4e25ac5c82 test(dingtalk): cover group reply routing 2026-03-07 16:07:57 +00:00
shawn_wxn
73991779b3 fix(dingtalk): use msg_key variable instead of hardcoded 2026-03-08 00:01:08 +08:00
shawn_wxn
caa2aa596d fix(dingtalk): correct msgKey parameter for group messages 2026-03-08 00:01:08 +08:00
shawn_wxn
26670d3e80 feat(dingtalk): add support for group chat messages 2026-03-08 00:01:08 +08:00
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
Re-bin
4021f5212c Merge main into pr-332 2026-03-07 15:02:06 +00:00
Re-bin
4f80e5318d Merge remote-tracking branch 'origin/main' into pr-1648 2026-03-07 14:42:40 +00:00
Gleb
44327d6457 fix(telegram): added "stop" command handler, fixed stop command 2026-03-07 12:38:52 +02:00
chengyongru
215360113f feat(feishu): add audio transcription support using Groq Whisper 2026-03-07 16:21:52 +08:00
Re-bin
c81d32c40f fix(discord): handle attachment reply fallback 2026-03-07 04:07:25 +00:00
Re-bin
614d6fef34 Merge remote-tracking branch 'origin/main' into pr-1613 2026-03-07 04:01:24 +00:00
fat-operator
067965da50 Refactored from image support to generic media 2026-03-07 00:26:49 +00:00
fat-operator
8c25897532 Remove image sending capabilities - cant be tested 2026-03-07 00:26:49 +00:00
fat-operator
fdd161d7b2 Implemented image support for whatsapp 2026-03-07 00:26:49 +00:00
Re-bin
0409d72579 feat(telegram): improve streaming UX and add table rendering 2026-03-06 16:19:19 +00:00
SLAR_Edge
a25923b793 feat: enhance message sending to include file attachments in Discord API 2026-03-06 17:10:53 +08:00
Re-bin
7e9616cbd3 merge origin/main into pr-1567 2026-03-06 06:51:28 +00:00
Re-bin
645e30557b Merge remote-tracking branch 'origin/main' into pr-1605 2026-03-06 06:00:32 +00:00
PiKaqqqqqq
c3526a7fdb fix(feishu): smart message format selection (fixes #1548)
Instead of always sending interactive cards, detect the optimal
message format based on content:
- text: short plain text (≤200 chars, no markdown)
- post: medium text with links (≤2000 chars)
- interactive: complex content (code, tables, headings, bold, lists)
2026-03-06 10:11:53 +08:00
pikaqqqqqq
5ced08b1f2 fix(feishu): use msg_type "media" for mp4 video files
Previously, mp4 video files were sent with msg_type "file", which meant
users had to download them to play. Feishu requires msg_type "media" for
audio and video files to enable inline playback in the chat.

Changes:
- Add _VIDEO_EXTS constant for video file extensions (.mp4, .mov, .avi)
- Use msg_type "media" for both audio (_AUDIO_EXTS) and video (_VIDEO_EXTS)
- Keep msg_type "file" for documents and other file types

The upload_file API already uses file_type="mp4" for video files via the
existing _FILE_TYPE_MAP, so only the send msg_type needed fixing.
2026-03-06 01:54:00 +08:00
Re-bin
573fc7cd95 Merge remote-tracking branch 'origin/main' into pr-1384 2026-03-05 15:19:50 +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
Re-bin
b070ae5b2b Merge remote-tracking branch 'origin/main' into pr-1522 2026-03-05 15:05:26 +00:00
Re-bin
06fcd2cc3f fix(discord): correct group_policy default to mention and style cleanup 2026-03-05 14:33:14 +00:00
Re-bin
376b7d6d58 Merge remote-tracking branch 'origin/main' into pr-553 2026-03-05 14:28:50 +00:00
coldxiangyu
97522bfa03 fix(feishu): isolate lark ws Client event loop from main asyncio loop
Commit 0209ad5 moved `import lark_oapi as lark` inside the start()
method (lazy import) to suppress DeprecationWarnings. This had an
unintended side effect: the import now happens after the main asyncio
loop is already running, so lark_oapi's module-level

    loop = asyncio.get_event_loop()

captures the running main loop. When the WebSocket thread then calls
loop.run_until_complete() inside Client.start(), Python raises:

    RuntimeError: This event loop is already running

and the _connect/_disconnect coroutines are never awaited.

Fix: in run_ws(), create a fresh event loop with asyncio.new_event_loop(),
set it as the thread's current loop, and patch lark_oapi.ws.client.loop
to point to this dedicated loop before calling Client.start(). The loop
is closed on thread exit.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-03-05 17:27:17 +08: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
Xubin Ren
fb74281434 Merge PR #1499: fix(qq): add msg_seq to prevent message deduplication error
fix(qq): add msg_seq to prevent message deduplication error
2026-03-05 10:39:45 +08:00
姚远
f78d655aba Fix: Telegram channel crash when proxy is configured 2026-03-05 04:29:00 +08:00
Sergio Sánchez Vallés
e032faaeff Merge branch 'main' of upstream/main into fix/test-failures 2026-03-04 20:04:00 +01:00
Sergio Sánchez Vallés
0209ad57d9 fix(tests): resolve RequestsDependencyWarning and lark-oapi asyncio/websockets DeprecationWarnings 2026-03-04 19:31:39 +01:00
Sergio Sánchez Vallés
ca1f41562c Fix telegram stop typing if not final message 2026-03-04 13:19:35 +01:00
Liwx
20bec3bc26 Update qq.py 2026-03-04 14:06:19 +08:00
Liwx
d0a48ed23c Update qq.py 2026-03-04 14:00:40 +08: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
Re-bin
be4f83a760 Merge branch 'main' into pr-1406 2026-03-02 06:24:53 +00:00
Re-bin
bbfc1b40c1 security: deny-by-default allowFrom with wildcard support and startup validation 2026-03-02 06:13:37 +00:00
Wenjie Lei
2c63946519 fix(matrix): normalize media metadata and keyword-call attachment upload 2026-03-01 21:56:08 -08:00
chengyongru
d447be5ca2 security: deny by default in is_allowed for all channels
When allow_from is not configured, block all access by default
instead of allowing everyone. This prevents unauthorized access
when channels are enabled without explicit allow lists.
2026-03-02 13:18:43 +08:00
Joel Chan
e9d023f52c feat(discord): add group policy to control group respond behaviour 2026-03-02 12:16:49 +08:00
zerone0x
8571df2e63 fix(feishu): split card messages when content has multiple tables
Feishu rejects interactive cards that contain more than one table element
(API error 11310: card table number over limit).

Add FeishuChannel._split_elements_by_table_limit() which partitions the flat
card-elements list into groups of at most one table each.  The send() method
now iterates over these groups and sends each as its own card message, so all
tables are delivered to the user instead of the entire message being dropped.

Single-table and table-free messages are unaffected (one card, same as before).

Fixes #1382
2026-03-01 15:13:44 +01:00
Re-bin
4752e95a24 merge origin/main into pr-1361 2026-03-01 06:36:29 +00:00
Re-bin
c2bbd6d20d Merge branch 'main' into pr-1361 2026-03-01 06:30:10 +00:00
Jack Lu
3ee061b879 Merge branch 'main' into main 2026-03-01 13:35:24 +08:00