feat(telegram): add sendPoll support (#16193) (#16209)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b58492cfed
Co-authored-by: robbyczgw-cla <239660374+robbyczgw-cla@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
This commit is contained in:
Robby
2026-02-14 18:34:30 +01:00
committed by GitHub
parent fc5d147d1b
commit 8e5689a84d
21 changed files with 364 additions and 11 deletions

View File

@@ -35,7 +35,15 @@ export const PollParamsSchema = Type.Object(
question: NonEmptyString,
options: Type.Array(NonEmptyString, { minItems: 2, maxItems: 12 }),
maxSelections: Type.Optional(Type.Integer({ minimum: 1, maximum: 12 })),
/** Poll duration in seconds (channel-specific limits may apply). */
durationSeconds: Type.Optional(Type.Integer({ minimum: 1, maximum: 600 })),
durationHours: Type.Optional(Type.Integer({ minimum: 1 })),
/** Send silently (no notification) where supported. */
silent: Type.Optional(Type.Boolean()),
/** Poll anonymity where supported (e.g. Telegram polls default to anonymous). */
isAnonymous: Type.Optional(Type.Boolean()),
/** Thread id (channel-specific meaning, e.g. Telegram forum topic id). */
threadId: Type.Optional(Type.String()),
channel: Type.Optional(Type.String()),
accountId: Type.Optional(Type.String()),
idempotencyKey: NonEmptyString,