fix: allow media-only telegram voice sends (#1099) (thanks @mukhtharcm)

This commit is contained in:
Peter Steinberger
2026-01-17 17:32:13 +00:00
parent f2a0e8e5bb
commit af29c6a980
4 changed files with 58 additions and 5 deletions

View File

@@ -42,11 +42,12 @@ export const telegramMessageActions: ChannelMessageActionAdapter = {
handleAction: async ({ action, params, cfg, accountId }) => {
if (action === "send") {
const to = readStringParam(params, "to", { required: true });
const content = readStringParam(params, "message", {
required: true,
allowEmpty: true,
});
const mediaUrl = readStringParam(params, "media", { trim: false });
const content =
readStringParam(params, "message", {
required: !mediaUrl,
allowEmpty: true,
}) ?? "";
const replyTo = readStringParam(params, "replyTo");
const threadId = readStringParam(params, "threadId");
const buttons = params.buttons;