test(telegram): restore DM binding regression test alongside suppression test

ClawSweeper review flagged that the new suppressReply test replaced the
existing direct-message binding regression test instead of being added
beside it. Restore the DM binding test to maintain coverage for the
plugin command dispatch surface.
This commit is contained in:
Alexander Chen
2026-06-05 21:31:48 -07:00
committed by Ayaan Zaidi
parent 6f809195b1
commit a1553c96fd
@@ -798,6 +798,19 @@ describe("registerTelegramNativeCommands", () => {
expect(commandParams.messageThreadId).toBe(1);
});
it("forwards direct-message binding context to Telegram plugin commands", async () => {
const { handler } = registerPlugCommand();
await handler(createPrivateCommandContext({ chatId: 100, userId: 200 }));
const commandParams = firstExecutePluginCommandParams();
expect(commandParams.channel).toBe("telegram");
expect(commandParams.accountId).toBe("default");
expect(commandParams.from).toBe("telegram:100");
expect(commandParams.to).toBe("telegram:100");
expect(commandParams.messageThreadId).toBeUndefined();
});
it("suppresses the fallback reply when a plugin command returns suppressReply: true", async () => {
const { handler } = registerPlugCommand({
result: { suppressReply: true },