feishu org sync fixed to root department#294
feishu org sync fixed to root department#294bigbearcool wants to merge 5 commits intodataelement:mainfrom
Conversation
- Add AgentGroup model for managing group relationships - Add agent_groups API for CRUD operations - Modify gateway send-message to support group targets - Add group relationships UI in AgentDetail page - Add broadcast_groups UI in ChannelConfig (feishu)
- Check if target is a group in AgentGroup before looking up members - Send directly to group chat_id via feishu_service for group targets - Works with existing send_channel_message tool call pattern
…tion The original per-department fetch fails because the root department (id=0) returns 'no dept authority error' - the app lacks permission to access it. Solution: override sync_org_structure to use contact/v3/users (global list) instead of find_by_department. This fetches all users regardless of their department hierarchy position, ensuring root-department users are included. Changes: - Add _fetch_all_users() using global /contact/v3/users API - Override sync_org_structure to use global user fetch - Keep dummy fetch_users() to satisfy abstract base class
…tments, fetch dept names
|
Thanks for building this — the idea of letting agents broadcast messages directly to chat groups (Feishu/WeCom/DingTalk) is a genuinely useful feature and something we want to support. However, this PR mixes the group broadcast feature with the Feishu org sync refactor (same change as PR #295, which we've reviewed separately). The org sync change has issues that prevent us from merging it right now. Rather than asking you to refactor and resubmit, we'd like to plan both features properly into a future release. Could you describe your use cases in a bit more detail? For group broadcast:
For the Feishu org sync issue (from PR #295):
We'll incorporate well-designed solutions for both in an upcoming version. Closing this PR for now. |
|
Hi wisdomqin, thanks for the detailed questions! |
Summary
Checklist