add multipoll support
This commit is contained in:
1 parent
ee5a6bdcc3
commit
28c60a94f3
1 file changed
+4
-3
@@ -343,7 +343,7 @@ async def guest_middleware(handler, event, data):
|
|||||||
correct_option = options[0]
|
correct_option = options[0]
|
||||||
correct_option_id = None
|
correct_option_id = None
|
||||||
is_anon = True
|
is_anon = True
|
||||||
allow_multiple_answers = False
|
allows_multiple_answers = False
|
||||||
|
|
||||||
if event.guest_message:
|
if event.guest_message:
|
||||||
mid = user_id
|
mid = user_id
|
||||||
@@ -359,10 +359,10 @@ async def guest_middleware(handler, event, data):
|
|||||||
correct_option_id = options.index(correct_option)
|
correct_option_id = options.index(correct_option)
|
||||||
elif poll_type == "poll":
|
elif poll_type == "poll":
|
||||||
poll_type = "regular"
|
poll_type = "regular"
|
||||||
allow_multiple_answers = False
|
allows_multiple_answers = False
|
||||||
elif poll_type == "multipoll":
|
elif poll_type == "multipoll":
|
||||||
poll_type = "regular"
|
poll_type = "regular"
|
||||||
allow_multiple_answers = True
|
allows_multiple_answers = True
|
||||||
else:
|
else:
|
||||||
poll_type = "regular"
|
poll_type = "regular"
|
||||||
|
|
||||||
@@ -374,6 +374,7 @@ async def guest_middleware(handler, event, data):
|
|||||||
options=options,
|
options=options,
|
||||||
is_anonymous=is_anon,
|
is_anonymous=is_anon,
|
||||||
poll_type=poll_type,
|
poll_type=poll_type,
|
||||||
|
allows_multiple_answers=allows_multiple_answers,
|
||||||
correct_option_id=correct_option_id,
|
correct_option_id=correct_option_id,
|
||||||
user_id=mid
|
user_id=mid
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user