fix(channels): normalize MIME kind parsing and reaction fallbacks

This commit is contained in:
Peter Steinberger
2026-03-02 23:48:00 +00:00
parent 32ecd6f579
commit ea3b7dfde5
13 changed files with 114 additions and 21 deletions

View File

@@ -872,6 +872,16 @@ describe("sendMessageTelegram", () => {
expectedMethod: "sendVoice" as const,
expectedOptions: { caption: "caption", parse_mode: "HTML" },
},
{
name: "normalizes parameterized audio MIME with mixed casing",
chatId: "123",
text: "caption",
mediaUrl: "https://example.com/note",
contentType: " Audio/Ogg; codecs=opus ",
fileName: "note.ogg",
expectedMethod: "sendAudio" as const,
expectedOptions: { caption: "caption", parse_mode: "HTML" },
},
];
for (const testCase of cases) {