refactor: rename to openclaw

This commit is contained in:
Peter Steinberger
2026-01-30 03:15:10 +01:00
parent 4583f88626
commit 9a7160786a
2357 changed files with 16688 additions and 16788 deletions

View File

@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import type { MoltbotConfig } from "../config/config.js";
import type { OpenClawConfig } from "../config/config.js";
import { setActivePluginRegistry } from "../plugins/runtime.js";
import { createTestRegistry } from "../test-utils/channel-plugins.js";
import { resolveCommandAuthorization } from "./command-auth.js";
@@ -22,7 +22,7 @@ describe("resolveCommandAuthorization", () => {
it("falls back from empty SenderId to SenderE164", () => {
const cfg = {
channels: { whatsapp: { allowFrom: ["+123"] } },
} as MoltbotConfig;
} as OpenClawConfig;
const ctx = {
Provider: "whatsapp",
@@ -45,7 +45,7 @@ describe("resolveCommandAuthorization", () => {
it("falls back from whitespace SenderId to SenderE164", () => {
const cfg = {
channels: { whatsapp: { allowFrom: ["+123"] } },
} as MoltbotConfig;
} as OpenClawConfig;
const ctx = {
Provider: "whatsapp",
@@ -68,7 +68,7 @@ describe("resolveCommandAuthorization", () => {
it("falls back to From when SenderId and SenderE164 are whitespace", () => {
const cfg = {
channels: { whatsapp: { allowFrom: ["+999"] } },
} as MoltbotConfig;
} as OpenClawConfig;
const ctx = {
Provider: "whatsapp",
@@ -91,7 +91,7 @@ describe("resolveCommandAuthorization", () => {
it("falls back from un-normalizable SenderId to SenderE164", () => {
const cfg = {
channels: { whatsapp: { allowFrom: ["+123"] } },
} as MoltbotConfig;
} as OpenClawConfig;
const ctx = {
Provider: "whatsapp",
@@ -114,7 +114,7 @@ describe("resolveCommandAuthorization", () => {
it("prefers SenderE164 when SenderId does not match allowFrom", () => {
const cfg = {
channels: { whatsapp: { allowFrom: ["+41796666864"] } },
} as MoltbotConfig;
} as OpenClawConfig;
const ctx = {
Provider: "whatsapp",
@@ -214,12 +214,12 @@ describe("control command parsing", () => {
it("ignores telegram commands addressed to other bots", () => {
expect(
hasControlCommand("/help@otherbot", undefined, {
botUsername: "moltbot",
botUsername: "openclaw",
}),
).toBe(false);
expect(
hasControlCommand("/help@moltbot", undefined, {
botUsername: "moltbot",
hasControlCommand("/help@openclaw", undefined, {
botUsername: "openclaw",
}),
).toBe(true);
});