diff --git a/src/channels/chat-type.test.ts b/src/channels/chat-type.test.ts index e5893419a7..6775c8cac8 100644 --- a/src/channels/chat-type.test.ts +++ b/src/channels/chat-type.test.ts @@ -15,4 +15,13 @@ describe("normalizeChatType", () => { expect(normalizeChatType("nope")).toBeUndefined(); expect(normalizeChatType("room")).toBeUndefined(); }); + + describe("backward compatibility", () => { + it("accepts legacy 'dm' value and normalizes to 'direct'", () => { + // Legacy config/input may use "dm" - ensure smooth upgrade path + expect(normalizeChatType("dm")).toBe("direct"); + expect(normalizeChatType("DM")).toBe("direct"); + expect(normalizeChatType(" dm ")).toBe("direct"); + }); + }); });