match nick without @ (XMPP strips @ symbol)
This commit is contained in:
+2
-2
@@ -152,8 +152,8 @@ class AgentBot(ClientXMPP):
|
||||
self._granted = None
|
||||
logging.info(f"👑 Coordinator 切换为 {_name}")
|
||||
break
|
||||
# hmo 直接 @点名 → 临时授权(一次)
|
||||
elif any(tag in body for tag in [f'@{AGENT_NICK}', f'@{AGENT_NAME}']):
|
||||
# hmo 直接点名(@可能被 XMPP 客户端剥离,同时匹配昵称)
|
||||
elif any(tag in body for tag in [f'@{AGENT_NICK}', f'@{AGENT_NAME}', AGENT_NICK, AGENT_NAME]):
|
||||
self._granted = AGENT_NICK
|
||||
logging.info(f"🎤 被 hmo 点名,获得发言权")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user