From a2652f02b5ac27120a1e2c5de275788e085bd0b5 Mon Sep 17 00:00:00 2001 From: trenoduro Date: Sat, 21 Mar 2020 16:03:29 +0100 Subject: [PATCH] Fix RPCError 400 QUIZ_CORRECT_ANSWER_EMPTY (#367) * Fix RPCError 400 QUIZ_CORRECT_ANSWER_EMPTY * Fix RPCError 400 QUIZ_CORRECT_ANSWER_EMPTY --- pyrogram/client/methods/messages/send_poll.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/methods/messages/send_poll.py b/pyrogram/client/methods/messages/send_poll.py index f5293c3f..e0baf5a8 100644 --- a/pyrogram/client/methods/messages/send_poll.py +++ b/pyrogram/client/methods/messages/send_poll.py @@ -110,7 +110,7 @@ class SendPoll(BaseClient): public_voters=not is_anonymous or None, quiz=type == "quiz" or None ), - correct_answers=[bytes([correct_option_id])] if correct_option_id else None + correct_answers=None if correct_option_id is None else [bytes([correct_option_id])] ), message="", silent=disable_notification or None,