Merge pull request #322 from uburuntu/dev-2.x

fix: change user context at poll_answer
This commit is contained in:
Alex Root Junior 2020-05-05 11:59:12 +03:00 committed by GitHub
commit 68857533c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)