mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 02:11:45 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -65,8 +65,8 @@ describe("normalizeForwardedContext", () => {
|
||||
it("handles legacy forwards with signatures", () => {
|
||||
const ctx = normalizeForwardedContext({
|
||||
forward_from_chat: {
|
||||
title: "Clawdbot Updates",
|
||||
username: "clawdbot",
|
||||
title: "Moltbot Updates",
|
||||
username: "moltbot",
|
||||
id: 99,
|
||||
type: "channel",
|
||||
},
|
||||
@@ -74,11 +74,11 @@ describe("normalizeForwardedContext", () => {
|
||||
forward_date: 789,
|
||||
} as any);
|
||||
expect(ctx).not.toBeNull();
|
||||
expect(ctx?.from).toBe("Clawdbot Updates (Stan)");
|
||||
expect(ctx?.from).toBe("Moltbot Updates (Stan)");
|
||||
expect(ctx?.fromType).toBe("legacy_channel");
|
||||
expect(ctx?.fromId).toBe("99");
|
||||
expect(ctx?.fromUsername).toBe("clawdbot");
|
||||
expect(ctx?.fromTitle).toBe("Clawdbot Updates");
|
||||
expect(ctx?.fromUsername).toBe("moltbot");
|
||||
expect(ctx?.fromTitle).toBe("Moltbot Updates");
|
||||
expect(ctx?.fromSignature).toBe("Stan");
|
||||
expect(ctx?.date).toBe(789);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user