mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 01:52:04 +00:00
refactor: centralize inbound mention policy
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import {
|
||||
implicitMentionKindWhen,
|
||||
resolveInboundMentionDecision,
|
||||
} from "openclaw/plugin-sdk/channel-inbound";
|
||||
import { vi } from "vitest";
|
||||
import type { PluginRuntime } from "./runtime-api.js";
|
||||
import { setMatrixRuntime } from "./runtime.js";
|
||||
@@ -56,6 +60,8 @@ export function installMatrixMonitorTestRuntime(
|
||||
options.matchesMentionPatterns ??
|
||||
((text: string, patterns: RegExp[]) => patterns.some((pattern) => pattern.test(text))),
|
||||
matchesMentionWithExplicit: () => false,
|
||||
implicitMentionKindWhen,
|
||||
resolveInboundMentionDecision,
|
||||
},
|
||||
media: {
|
||||
fetchRemoteMedia: vi.fn(),
|
||||
|
||||
Reference in New Issue
Block a user