ForcePilot/backend/package/yuxi/channel/extensions/zoomchat/mentions.py
Kris d5e36d33b7 feat(channel): 添加 Zalo OA、Zoom Chat 和 Zulip 渠道扩展
新增 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
2026-05-21 12:06:26 +08:00

22 lines
557 B
Python

import re
import logging
logger = logging.getLogger(__name__)
class ZoomMentions:
def extract_mentions(self, raw_message: dict) -> list[str]:
inner = raw_message.get("payload", {}).get("object", {})
chat_type = inner.get("chat_type", "group")
sender = inner.get("sender", "")
content = inner.get("message", "")
if chat_type == "1on1":
return [sender]
mentions = []
matches = re.findall(r"@([\w.@-]+)", content)
mentions.extend(matches)
return list(set(mentions))