mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 12:50:22 +00:00
refactor(plugins): move channel behavior into plugins
This commit is contained in:
@@ -1,22 +1,3 @@
|
||||
import { getChannelPlugin, normalizeChannelId } from "../../channels/plugins/index.js";
|
||||
import type { ChannelGroupContext } from "../../channels/plugins/types.js";
|
||||
|
||||
function resolveRequireMentionForChannel(
|
||||
channelId: "discord" | "slack",
|
||||
params: ChannelGroupContext,
|
||||
): boolean | undefined {
|
||||
const plugin = getChannelPlugin(channelId);
|
||||
return plugin?.groups?.resolveRequireMention?.(params);
|
||||
}
|
||||
|
||||
export { getChannelPlugin, normalizeChannelId };
|
||||
|
||||
export function resolveDiscordGroupRequireMention(
|
||||
params: ChannelGroupContext,
|
||||
): boolean | undefined {
|
||||
return resolveRequireMentionForChannel("discord", params);
|
||||
}
|
||||
|
||||
export function resolveSlackGroupRequireMention(params: ChannelGroupContext): boolean | undefined {
|
||||
return resolveRequireMentionForChannel("slack", params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user