fix: unify telegram thread handling

This commit is contained in:
Ayaan Zaidi
2026-02-02 08:53:42 +05:30
committed by Ayaan Zaidi
parent 5020bfa2a9
commit 19b8416a81
10 changed files with 151 additions and 46 deletions

View File

@@ -59,6 +59,7 @@ describe("dispatchTelegramMessage draft streaming", () => {
isGroup: false,
resolvedThreadId: undefined,
replyThreadId: 777,
threadSpec: { id: 777, scope: "dm" },
historyKey: undefined,
historyLimit: 0,
groupHistories: new Map(),
@@ -88,13 +89,13 @@ describe("dispatchTelegramMessage draft streaming", () => {
expect(createTelegramDraftStream).toHaveBeenCalledWith(
expect.objectContaining({
chatId: 123,
messageThreadId: 777,
thread: { id: 777, scope: "dm" },
}),
);
expect(draftStream.update).toHaveBeenCalledWith("Hello");
expect(deliverReplies).toHaveBeenCalledWith(
expect.objectContaining({
messageThreadId: 777,
thread: { id: 777, scope: "dm" },
}),
);
});