mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-28 17:38:38 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -2,7 +2,7 @@ import type { ChannelDock } from "../channels/dock.js";
|
||||
import { getChannelDock, listChannelDocks } from "../channels/dock.js";
|
||||
import type { ChannelId } from "../channels/plugins/types.js";
|
||||
import { normalizeAnyChannelId } from "../channels/registry.js";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { MsgContext } from "./templating.js";
|
||||
|
||||
export type CommandAuthorization = {
|
||||
@@ -14,7 +14,7 @@ export type CommandAuthorization = {
|
||||
to?: string;
|
||||
};
|
||||
|
||||
function resolveProviderFromContext(ctx: MsgContext, cfg: ClawdbotConfig): ChannelId | undefined {
|
||||
function resolveProviderFromContext(ctx: MsgContext, cfg: MoltbotConfig): ChannelId | undefined {
|
||||
const direct =
|
||||
normalizeAnyChannelId(ctx.Provider) ??
|
||||
normalizeAnyChannelId(ctx.Surface) ??
|
||||
@@ -44,7 +44,7 @@ function resolveProviderFromContext(ctx: MsgContext, cfg: ClawdbotConfig): Chann
|
||||
|
||||
function formatAllowFromList(params: {
|
||||
dock?: ChannelDock;
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
accountId?: string | null;
|
||||
allowFrom: Array<string | number>;
|
||||
}): string[] {
|
||||
@@ -58,7 +58,7 @@ function formatAllowFromList(params: {
|
||||
|
||||
function normalizeAllowFromEntry(params: {
|
||||
dock?: ChannelDock;
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
accountId?: string | null;
|
||||
value: string;
|
||||
}): string[] {
|
||||
@@ -74,7 +74,7 @@ function normalizeAllowFromEntry(params: {
|
||||
function resolveSenderCandidates(params: {
|
||||
dock?: ChannelDock;
|
||||
providerId?: ChannelId;
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
accountId?: string | null;
|
||||
senderId?: string | null;
|
||||
senderE164?: string | null;
|
||||
@@ -108,7 +108,7 @@ function resolveSenderCandidates(params: {
|
||||
|
||||
export function resolveCommandAuthorization(params: {
|
||||
ctx: MsgContext;
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
commandAuthorized: boolean;
|
||||
}): CommandAuthorization {
|
||||
const { ctx, cfg, commandAuthorized } = params;
|
||||
|
||||
Reference in New Issue
Block a user