Commit Graph

4 Commits

Author SHA1 Message Date
ryan a07963e150 feat: enhance Safew chat handling and testing
- Updated `GroupsFromUpdates` function to return the number of updates processed, improving the polling mechanism.
- Added a new test `TestGroupsFromUpdatesCallbackAndJoinRequest` to validate handling of callback queries and join requests.
- Introduced `safewAllowedUpdates` to specify allowed update types in the polling request, enhancing chat management.
- Implemented `ensureWebhookCleared` method to manage webhook state before polling, improving reliability.
2026-08-15 01:56:12 +08:00
ryan e369f398d8 feat: enhance Safew error handling and polling mechanism
- Added error_msg field to safewAPIResponse for better error descriptions.
- Updated safewErrorDescription function to include error_msg in the output.
- Introduced a new test to verify that error messages are included in Safew error descriptions.
- Improved the polling mechanism in the Watcher to handle conflicts and ensure no overlapping polls occur.
2026-08-15 01:07:01 +08:00
ryan bd8a9ff96d feat: 增加 SafeW 已监控群列表接口
通过 getUpdates 将群写入 Redis,供创建/编辑渠道时选择 chat_id,避免前端重复传递 token。
2026-08-15 00:40:40 +08:00
ryan 0d0cd0c510 feat: 新增 SafeW 出站通知渠道
通过 Bot API sendMessage 投递渲染后的通知,MarkdownV2 自动转义标题与正文。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 00:58:44 +08:00