refactor!: rename chat providers to channels
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { getChannelDock } from "../../channels/dock.js";
|
||||
import { normalizeChannelId } from "../../channels/registry.js";
|
||||
import type { ClawdbotConfig } from "../../config/config.js";
|
||||
import type { ReplyToMode } from "../../config/types.js";
|
||||
import { getProviderDock } from "../../providers/dock.js";
|
||||
import { normalizeProviderId } from "../../providers/registry.js";
|
||||
import type { OriginatingChannelType } from "../templating.js";
|
||||
import type { ReplyPayload } from "../types.js";
|
||||
|
||||
@@ -10,9 +10,9 @@ export function resolveReplyToMode(
|
||||
channel?: OriginatingChannelType,
|
||||
accountId?: string | null,
|
||||
): ReplyToMode {
|
||||
const provider = normalizeProviderId(channel);
|
||||
const provider = normalizeChannelId(channel);
|
||||
if (!provider) return "all";
|
||||
const resolved = getProviderDock(provider)?.threading?.resolveReplyToMode?.({
|
||||
const resolved = getChannelDock(provider)?.threading?.resolveReplyToMode?.({
|
||||
cfg,
|
||||
accountId,
|
||||
});
|
||||
@@ -43,9 +43,9 @@ export function createReplyToModeFilterForChannel(
|
||||
mode: ReplyToMode,
|
||||
channel?: OriginatingChannelType,
|
||||
) {
|
||||
const provider = normalizeProviderId(channel);
|
||||
const provider = normalizeChannelId(channel);
|
||||
const allowTagsWhenOff = provider
|
||||
? Boolean(getProviderDock(provider)?.threading?.allowTagsWhenOff)
|
||||
? Boolean(getChannelDock(provider)?.threading?.allowTagsWhenOff)
|
||||
: false;
|
||||
return createReplyToModeFilter(mode, {
|
||||
allowTagsWhenOff,
|
||||
|
||||
Reference in New Issue
Block a user