fix(model): land #30932 auth-profile @ parsing for /model (@haosenwang1018)

Landed from contributor PR #30932 by @haosenwang1018.

Co-authored-by: haosenwang1018 <haosenwang1018@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-03-02 03:04:16 +00:00
parent 15c1c93a95
commit e4e5d9c98c
5 changed files with 19 additions and 7 deletions

View File

@@ -1775,10 +1775,14 @@ describe("createTelegramBot", () => {
});
expect(sendMessageSpy.mock.calls.length).toBeGreaterThan(1);
for (const call of sendMessageSpy.mock.calls) {
expect((call[2] as { reply_to_message_id?: number } | undefined)?.reply_to_message_id).toBe(
messageId,
);
for (const [index, call] of sendMessageSpy.mock.calls.entries()) {
const actual = (call[2] as { reply_to_message_id?: number } | undefined)
?.reply_to_message_id;
if (mode === "all" || index === 0) {
expect(actual).toBe(messageId);
} else {
expect(actual).toBeUndefined();
}
}
}
});

View File

@@ -294,7 +294,7 @@ export async function deliverReplies(params: {
replyMarkup,
});
}
if (replyToMessageIdForPayload && !hasReplied) {
if (replyToMessageId && !hasReplied) {
hasReplied = true;
}
continue;