mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-07 22:09:57 +00:00
Harden Telegram poll gating and schema consistency (#36547)
Merged via squash.
Prepared head SHA: f77824419e
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
committed by
GitHub
parent
f771ba8de9
commit
6dfd39c32f
@@ -26,6 +26,13 @@ type NormalizePollOptions = {
|
||||
maxOptions?: number;
|
||||
};
|
||||
|
||||
export function resolvePollMaxSelections(
|
||||
optionCount: number,
|
||||
allowMultiselect: boolean | undefined,
|
||||
): number {
|
||||
return allowMultiselect ? Math.max(2, optionCount) : 1;
|
||||
}
|
||||
|
||||
export function normalizePollInput(
|
||||
input: PollInput,
|
||||
options: NormalizePollOptions = {},
|
||||
|
||||
Reference in New Issue
Block a user