mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-28 18:33:37 +00:00
fix(cli): route telegram thread create to topic-create
This commit is contained in:
14
src/cli/program/message/register.thread.test.ts
Normal file
14
src/cli/program/message/register.thread.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { __test__ } from "./register.thread.js";
|
||||
|
||||
describe("resolveThreadCreateAction", () => {
|
||||
it("maps telegram thread create to topic-create", () => {
|
||||
expect(__test__.resolveThreadCreateAction({ channel: "telegram" })).toBe("topic-create");
|
||||
expect(__test__.resolveThreadCreateAction({ channel: " Telegram " })).toBe("topic-create");
|
||||
});
|
||||
|
||||
it("keeps thread-create for non-telegram channels", () => {
|
||||
expect(__test__.resolveThreadCreateAction({ channel: "discord" })).toBe("thread-create");
|
||||
expect(__test__.resolveThreadCreateAction({ channel: undefined })).toBe("thread-create");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user