fix: normalize limit with readNumberParam in both adapters for consistency

This commit is contained in:
Marcus Castro
2026-02-10 15:02:54 -03:00
committed by Peter Steinberger
parent 475299346a
commit a8f0b77bb2
2 changed files with 4 additions and 2 deletions

View File

@@ -426,8 +426,9 @@ export const slackPlugin: ChannelPlugin<ResolvedSlackAccount> = {
}
if (action === "emoji-list") {
const limit = readNumberParam(params, "limit", { integer: true });
return await getSlackRuntime().channel.slack.handleSlackAction(
{ action: "emojiList", limit: params.limit, accountId: accountId ?? undefined },
{ action: "emojiList", limit, accountId: accountId ?? undefined },
cfg,
);
}

View File

@@ -210,8 +210,9 @@ export function createSlackActions(providerId: string): ChannelMessageActionAdap
}
if (action === "emoji-list") {
const limit = readNumberParam(params, "limit", { integer: true });
return await handleSlackAction(
{ action: "emojiList", limit: params.limit, accountId: accountId ?? undefined },
{ action: "emojiList", limit, accountId: accountId ?? undefined },
cfg,
);
}