mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 14:44:32 +00:00
fix(mentions): check mentionPatterns even when explicit mention is available
This commit is contained in:
committed by
Ayaan Zaidi
parent
fcc53bcf1b
commit
22b59d24ce
@@ -90,7 +90,9 @@ export function matchesMentionWithExplicit(params: {
|
||||
const explicit = params.explicit?.isExplicitlyMentioned === true;
|
||||
const explicitAvailable = params.explicit?.canResolveExplicit === true;
|
||||
const hasAnyMention = params.explicit?.hasAnyMention === true;
|
||||
if (hasAnyMention && explicitAvailable) return explicit;
|
||||
if (hasAnyMention && explicitAvailable) {
|
||||
return explicit || params.mentionRegexes.some((re) => re.test(cleaned));
|
||||
}
|
||||
if (!cleaned) return explicit;
|
||||
return explicit || params.mentionRegexes.some((re) => re.test(cleaned));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user