新增 Zalo OA、Zoom Chat、Zulip 三个渠道扩展。 Zalo OA 渠道扩展主要模块:sidecar_client, config, gateway, outbound, streaming, pairing, security, auth, dedupe, directory, monitor, status, session, reactions, tools Zoom Chat 渠道扩展主要模块:config, gateway, webhook, outbound, streaming, pairing, security, crypto, dedupe, actions, media, mentions, monitor, status, session, reactions, threading Zulip 渠道扩展主要模块:client, config, gateway, outbound, streaming, pairing, security, monitor, status
13 lines
496 B
Python
13 lines
496 B
Python
def build_dm_session_key(email: str, account_id: str) -> str:
|
|
return f"zoomchat:dm:{account_id}:{email}"
|
|
|
|
|
|
def build_group_session_key(channel_id: str, account_id: str) -> str:
|
|
return f"zoomchat:group:{account_id}:{channel_id}"
|
|
|
|
|
|
def resolve_session_key(chat_type: str, peer_id: str, channel_id: str | None, account_id: str) -> str:
|
|
if chat_type == "1on1":
|
|
return build_dm_session_key(peer_id, account_id)
|
|
return build_group_session_key(channel_id or peer_id, account_id)
|