mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
Fix lint in telegram poll action handler
This commit is contained in:
@@ -220,7 +220,7 @@ export async function handleTelegramAction(
|
||||
}
|
||||
const to = readStringParam(params, "to", { required: true });
|
||||
const question = readStringParam(params, "question", { required: true });
|
||||
const options = (params.options ?? params.answers) as unknown;
|
||||
const options = params.options ?? params.answers;
|
||||
if (!Array.isArray(options)) {
|
||||
throw new Error("options must be an array of strings");
|
||||
}
|
||||
@@ -241,7 +241,7 @@ export async function handleTelegramAction(
|
||||
integer: true,
|
||||
});
|
||||
const maxSelections =
|
||||
typeof params.allowMultiselect === "boolean" && params.allowMultiselect === true ? 2 : 1;
|
||||
typeof params.allowMultiselect === "boolean" && params.allowMultiselect ? 2 : 1;
|
||||
const token = resolveTelegramToken(cfg, { accountId }).token;
|
||||
if (!token) {
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user