mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-17 04:01:05 +00:00
refactor: centralize inbound mention policy
This commit is contained in:
@@ -4,6 +4,10 @@ import {
|
||||
removeAckReactionAfterReply,
|
||||
shouldAckReaction,
|
||||
} from "../../../src/channels/ack-reactions.js";
|
||||
import {
|
||||
implicitMentionKindWhen,
|
||||
resolveInboundMentionDecision,
|
||||
} from "../../../src/channels/mention-gating.js";
|
||||
import type { PluginRuntime } from "../../../src/plugins/runtime/types.js";
|
||||
|
||||
type DeepPartial<T> = {
|
||||
@@ -298,6 +302,8 @@ export function createPluginRuntimeMock(overrides: DeepPartial<PluginRuntime> =
|
||||
? true
|
||||
: params.mentionRegexes.some((regex) => regex.test(params.text)),
|
||||
) as unknown as PluginRuntime["channel"]["mentions"]["matchesMentionWithExplicit"],
|
||||
implicitMentionKindWhen,
|
||||
resolveInboundMentionDecision,
|
||||
},
|
||||
reactions: {
|
||||
shouldAckReaction,
|
||||
|
||||
Reference in New Issue
Block a user