fix(telegram): preserve inbound quote context and avoid QUOTE_TEXT_INVALID

This commit is contained in:
Denis Rybnikov
2026-02-08 23:48:14 +01:00
committed by Ayaan Zaidi
parent 727a390d13
commit a4b38ce886
4 changed files with 60 additions and 26 deletions

View File

@@ -194,7 +194,7 @@ describe("deliverReplies", () => {
);
});
it("uses reply_parameters when quote text is provided", async () => {
it("uses reply_to_message_id when quote text is provided", async () => {
const runtime = { error: vi.fn(), log: vi.fn() };
const sendMessage = vi.fn().mockResolvedValue({
message_id: 10,
@@ -217,10 +217,14 @@ describe("deliverReplies", () => {
"123",
expect.any(String),
expect.objectContaining({
reply_parameters: {
message_id: 500,
quote: "quoted text",
},
reply_to_message_id: 500,
}),
);
expect(sendMessage).toHaveBeenCalledWith(
"123",
expect.any(String),
expect.not.objectContaining({
reply_parameters: expect.anything(),
}),
);
});