refactor(plugins): move channel behavior into plugins

This commit is contained in:
Peter Steinberger
2026-04-03 17:54:01 +01:00
parent c52df32878
commit ab96520bba
158 changed files with 5967 additions and 5054 deletions

View File

@@ -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);
}