Why is poll_answer.option_ids result different between web and mobile versions?
Question is same, answer is same:
Web:
poll_answer.option_ids:[0, 0]
correct_ids:[0]
Mobile:
poll_answer.option_ids:[0]
correct_ids:[0]
async def handler_poll_answer(bot, poll_answer: PollAnswer, state: FSMContext):
state_data = await state.get_data()
chat_id = poll_answer.user.id
exam = state_data.get("exam")
print(f"poll_answer.option_ids:{poll_answer.option_ids}")
print(f"correct_ids:{state_data.get("correct_option_indices")}")
if poll_answer.option_ids == state_data.get("correct_option_indices"):
await bot.send_message(chat_id=chat_id, text="Ответ верный! ✅")
if exam:
current_score = state_data.get("score", 0)
await state.update_data(score=current_score + 1)
else:
await bot.send_message(chat_id=chat_id, text="Ответ неверный! ❌")
await delete_question_message(bot,chat_id,state)
if exam:
questions_count = state_data.get("questions_count", 0)
await state.update_data(questions_count=questions_count + 1)
await exam_send_question(bot,chat_id, state)
else:
await send_question(bot, chat_id, state)
I want correctly process poll responses from both the web version and the mobile version
1