Telegram: honor caption param for media sends (#1888)
Co-authored-by: Marc Güell Segarra <mguellsegarra@users.noreply.github.com>
This commit is contained in:
@@ -15,6 +15,7 @@ Status: unreleased.
|
|||||||
- macOS: avoid crash when rendering code blocks by bumping Textual to 0.3.1. (#2033) Thanks @garricn.
|
- macOS: avoid crash when rendering code blocks by bumping Textual to 0.3.1. (#2033) Thanks @garricn.
|
||||||
- Browser: fall back to URL matching for extension relay target resolution. (#1999) Thanks @jonit-dev.
|
- Browser: fall back to URL matching for extension relay target resolution. (#1999) Thanks @jonit-dev.
|
||||||
- Update: ignore dist/control-ui for dirty checks and restore after ui builds. (#1976) Thanks @Glucksberg.
|
- Update: ignore dist/control-ui for dirty checks and restore after ui builds. (#1976) Thanks @Glucksberg.
|
||||||
|
- Telegram: allow caption param for media sends. (#1888) Thanks @mguellsegarra.
|
||||||
|
|
||||||
## 2026.1.24-3
|
## 2026.1.24-3
|
||||||
|
|
||||||
|
|||||||
@@ -13,11 +13,9 @@ const providerId = "telegram";
|
|||||||
function readTelegramSendParams(params: Record<string, unknown>) {
|
function readTelegramSendParams(params: Record<string, unknown>) {
|
||||||
const to = readStringParam(params, "to", { required: true });
|
const to = readStringParam(params, "to", { required: true });
|
||||||
const mediaUrl = readStringParam(params, "media", { trim: false });
|
const mediaUrl = readStringParam(params, "media", { trim: false });
|
||||||
const content =
|
const message = readStringParam(params, "message", { required: !mediaUrl, allowEmpty: true });
|
||||||
readStringParam(params, "message", {
|
const caption = readStringParam(params, "caption", { allowEmpty: true });
|
||||||
required: !mediaUrl,
|
const content = message || caption || "";
|
||||||
allowEmpty: true,
|
|
||||||
}) ?? "";
|
|
||||||
const replyTo = readStringParam(params, "replyTo");
|
const replyTo = readStringParam(params, "replyTo");
|
||||||
const threadId = readStringParam(params, "threadId");
|
const threadId = readStringParam(params, "threadId");
|
||||||
const buttons = params.buttons;
|
const buttons = params.buttons;
|
||||||
|
|||||||
Reference in New Issue
Block a user