From 65184fb126d6f4f4f97a5291bdc2deaaa24625b4 Mon Sep 17 00:00:00 2001 From: uburuntu Date: Tue, 5 May 2020 11:50:41 +0300 Subject: [PATCH] fix: change user context at poll_answer --- aiogram/dispatcher/dispatcher.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 950ce60f..b485fa49 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -236,6 +236,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin): if update.poll: return await self.poll_handlers.notify(update.poll) if update.poll_answer: + types.User.set_current(update.poll_answer.user) return await self.poll_answer_handlers.notify(update.poll_answer) except Exception as e: err = await self.errors_handlers.notify(update, e)