mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 07:10:35 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -7,7 +7,7 @@ let getTelegramSequentialKey: typeof import("./bot.js").getTelegramSequentialKey
|
||||
let resetInboundDedupe: typeof import("../auto-reply/reply/inbound-dedupe.js").resetInboundDedupe;
|
||||
|
||||
const { sessionStorePath } = vi.hoisted(() => ({
|
||||
sessionStorePath: `/tmp/clawdbot-telegram-throttler-${Math.random().toString(16).slice(2)}.json`,
|
||||
sessionStorePath: `/tmp/moltbot-telegram-throttler-${Math.random().toString(16).slice(2)}.json`,
|
||||
}));
|
||||
const { loadWebMedia } = vi.hoisted(() => ({
|
||||
loadWebMedia: vi.fn(),
|
||||
@@ -289,7 +289,7 @@ describe("createTelegramBot", () => {
|
||||
message_id: 10,
|
||||
},
|
||||
},
|
||||
me: { username: "clawdbot_bot" },
|
||||
me: { username: "moltbot_bot" },
|
||||
getFile: async () => ({ download: async () => new Uint8Array() }),
|
||||
});
|
||||
|
||||
@@ -323,7 +323,7 @@ describe("createTelegramBot", () => {
|
||||
};
|
||||
await handler({
|
||||
message,
|
||||
me: { username: "clawdbot_bot" },
|
||||
me: { username: "moltbot_bot" },
|
||||
getFile: async () => ({ download: async () => new Uint8Array() }),
|
||||
});
|
||||
|
||||
@@ -366,7 +366,7 @@ describe("createTelegramBot", () => {
|
||||
date: 1736380800,
|
||||
from: { id: 999, username: "random" },
|
||||
},
|
||||
me: { username: "clawdbot_bot" },
|
||||
me: { username: "moltbot_bot" },
|
||||
getFile: async () => ({ download: async () => new Uint8Array() }),
|
||||
});
|
||||
|
||||
@@ -403,12 +403,12 @@ describe("createTelegramBot", () => {
|
||||
|
||||
await handler({
|
||||
message,
|
||||
me: { username: "clawdbot_bot" },
|
||||
me: { username: "moltbot_bot" },
|
||||
getFile: async () => ({ download: async () => new Uint8Array() }),
|
||||
});
|
||||
await handler({
|
||||
message: { ...message, text: "hello again" },
|
||||
me: { username: "clawdbot_bot" },
|
||||
me: { username: "moltbot_bot" },
|
||||
getFile: async () => ({ download: async () => new Uint8Array() }),
|
||||
});
|
||||
|
||||
@@ -423,7 +423,7 @@ describe("createTelegramBot", () => {
|
||||
const handler = getOnHandler("message") as (ctx: Record<string, unknown>) => Promise<void>;
|
||||
await handler({
|
||||
message: { chat: { id: 42, type: "private" }, text: "hi" },
|
||||
me: { username: "clawdbot_bot" },
|
||||
me: { username: "moltbot_bot" },
|
||||
getFile: async () => ({ download: async () => new Uint8Array() }),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user