deer-flow/backend/app/channels/notification_groups.py
Totoro 5ae95e6a34
feat: add Feishu group notifications and fix mention caret placement (#6762)
* feat(feishu): deliver scheduled-task notifications to bound users

* feat: add Feishu group notifications and fix mention caret placement

* fix(frontend): preserve group targets while capabilities load

---------

Co-authored-by: Totoro-qaq <279883115+Totoro-qaq@users.noreply.github.com>
2026-10-13 07:17:56 +08:00

7 lines
513 B
Python

"""SDK-free checks for explicit Feishu group notification destinations."""
def is_feishu_notification_group(*, provider: object, status: object, workspace_id: object, metadata: object) -> bool:
"""Check the group shape; callers must separately verify owner and ID."""
return provider == "feishu" and status == "connected" and isinstance(workspace_id, str) and bool(workspace_id.strip()) and isinstance(metadata, dict) and metadata.get("chat_type") == "group" and metadata.get("chat_id") == workspace_id