Skip to content

Commit 0c2c6ba

Browse files
steipeteZakaria Rahali
andcommitted
test(telegram): cover streamed reply option parity
Co-authored-by: Zakaria Rahali <[email protected]>
1 parent ebde6a4 commit 0c2c6ba

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎extensions/telegram/src/draft-stream.test.ts‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,12 +313,22 @@ describe("createTelegramDraftStream", () => {
313313

314314
it("disables link previews on the streamed send and on every edit", async () => {
315315
const api = createMockDraftApi();
316-
const stream = createDraftStream(api, { linkPreview: false });
316+
const stream = createDraftStream(api, {
317+
linkPreview: false,
318+
thread: { id: 42, scope: "dm" },
319+
replyToMessageId: 411,
320+
replyToMode: "all",
321+
});
317322

318323
stream.update("see https://example.com");
319324
await stream.flush();
320325

321326
expect(api.sendMessage).toHaveBeenCalledWith(123, "see https://example.com", {
327+
message_thread_id: 42,
328+
reply_parameters: {
329+
message_id: 411,
330+
allow_sending_without_reply: true,
331+
},
322332
link_preview_options: { is_disabled: true },
323333
});
324334

0 commit comments

Comments
 (0)