fix(telegram): react action accepts numeric messageId and chatId

The react action used readStringParam for messageId and chatId, which
rejected numeric values with a misleading "messageId required" error.
Switched to readStringOrNumberParam to match the delete/edit actions.

Closes #1459

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ayush Ojha
2026-01-30 01:06:49 -08:00
committed by Ayaan Zaidi
parent 3a85cb1833
commit f760aa302c

View File

@@ -85,7 +85,7 @@ export const telegramMessageActions: ChannelMessageActionAdapter = {
}
if (action === "react") {
const messageId = readStringParam(params, "messageId", {
const messageId = readStringOrNumberParam(params, "messageId", {
required: true,
});
const emoji = readStringParam(params, "emoji", { allowEmpty: true });
@@ -94,7 +94,9 @@ export const telegramMessageActions: ChannelMessageActionAdapter = {
{
action: "react",
chatId:
readStringParam(params, "chatId") ?? readStringParam(params, "to", { required: true }),
readStringOrNumberParam(params, "chatId") ??
readStringOrNumberParam(params, "channelId") ??
readStringParam(params, "to", { required: true }),
messageId,
emoji,
remove,