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:
parent
3a85cb1833
commit
f760aa302c
@ -85,7 +85,7 @@ export const telegramMessageActions: ChannelMessageActionAdapter = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (action === "react") {
|
if (action === "react") {
|
||||||
const messageId = readStringParam(params, "messageId", {
|
const messageId = readStringOrNumberParam(params, "messageId", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
const emoji = readStringParam(params, "emoji", { allowEmpty: true });
|
const emoji = readStringParam(params, "emoji", { allowEmpty: true });
|
||||||
@ -94,7 +94,9 @@ export const telegramMessageActions: ChannelMessageActionAdapter = {
|
|||||||
{
|
{
|
||||||
action: "react",
|
action: "react",
|
||||||
chatId:
|
chatId:
|
||||||
readStringParam(params, "chatId") ?? readStringParam(params, "to", { required: true }),
|
readStringOrNumberParam(params, "chatId") ??
|
||||||
|
readStringOrNumberParam(params, "channelId") ??
|
||||||
|
readStringParam(params, "to", { required: true }),
|
||||||
messageId,
|
messageId,
|
||||||
emoji,
|
emoji,
|
||||||
remove,
|
remove,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user