mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
fix(send_message): recognize XMPP JIDs as explicit targets
_parse_target_ref() has no handler for XMPP JIDs (user@server or room@conference.server), so they fall through to the final `return None, None, False`. This causes send_message to fail when targeting an XMPP chat by JID, since the JID is not numeric and doesn't match any other platform pattern. Add an explicit check for XMPP targets containing '@', matching the existing Matrix pattern above it.
This commit is contained in:
parent
0bc5f7b235
commit
a54d4b0e46
1 changed files with 3 additions and 0 deletions
|
|
@ -355,6 +355,9 @@ def _parse_target_ref(platform_name: str, target_ref: str):
|
|||
# Matrix room IDs (start with !) and user IDs (start with @) are explicit
|
||||
if platform_name == "matrix" and (target_ref.startswith("!") or target_ref.startswith("@")):
|
||||
return target_ref, None, True
|
||||
# XMPP JIDs (user@server or room@conference.server) are explicit
|
||||
if platform_name == "xmpp" and "@" in target_ref:
|
||||
return target_ref, None, True
|
||||
return None, None, False
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue