MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / resolve_role_chat_id

Function resolve_role_chat_id

agents/master-coordinator/main.py:235–244  ·  view source on GitHub ↗

Resolve the Feishu chat target for a role user.

(user_id: str, profile: Optional[Dict[str, Any]] = None)

Source from the content-addressed store, hash-verified

233
234
235def 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
247def profile_needs_bootstrap(profile: Dict[str, Any]) -> bool:

Callers 1

__init__Method · 0.85

Calls 2

get_role_meta_for_userFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected