From e22b237a5cec448efca748a741fd17519f32bedf Mon Sep 17 00:00:00 2001 From: Sreelal TS Date: Mon, 6 May 2024 22:50:33 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=F0=9F=8F=BB=E2=80=8D=F0=9F=94=A7?= =?UTF-8?q?=20Minor=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/telegram/models/input_poll_option.dart | 2 +- lib/src/televerse/raw_api.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/telegram/models/input_poll_option.dart b/lib/src/telegram/models/input_poll_option.dart index f926c8d4..1fc5c3d9 100644 --- a/lib/src/telegram/models/input_poll_option.dart +++ b/lib/src/telegram/models/input_poll_option.dart @@ -35,6 +35,6 @@ class InputPollOption { 'text': text, 'text_parse_mode': textParseMode?.value, 'text_entities': textEntities?.map((entity) => entity.toJson()).toList(), - }; + }..removeWhere(_nullFilter); } } diff --git a/lib/src/televerse/raw_api.dart b/lib/src/televerse/raw_api.dart index 7c2d5872..c1c2b406 100644 --- a/lib/src/televerse/raw_api.dart +++ b/lib/src/televerse/raw_api.dart @@ -1145,7 +1145,7 @@ class RawAPI { "chat_id": chatId.id, "message_thread_id": messageThreadId, "question": question, - "options": options.map((e) => e.toJson()), + "options": options.map((e) => e.toJson()).toList(), "is_anonymous": isAnonymous, "type": type.type, "allows_multiple_answers": allowsMultipleAnswers,