Resolve the Feishu chat target for a role user.
(user_id: str, profile: Optional[Dict[str, Any]] = None)
| 233 | |
| 234 | |
| 235 | def resolve_role_chat_id(user_id: str, profile: Optional[Dict[str, Any]] = None) -> Optional[str]: |
| 236 | """Resolve the Feishu chat target for a role user.""" |
| 237 | if profile and profile.get("feishu_chat_id"): |
| 238 | return profile.get("feishu_chat_id") |
| 239 | |
| 240 | role_meta = get_role_meta_for_user(user_id) |
| 241 | if role_meta: |
| 242 | return role_meta.get("feishu_chat_id") |
| 243 | |
| 244 | return None |
| 245 | |
| 246 | |
| 247 | def profile_needs_bootstrap(profile: Dict[str, Any]) -> bool: |
no test coverage detected