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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user