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,