mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fixed poll answer FSM context (#1436)
* Add voter_chat to poll_answer event handling The change ensures that when a poll_answer event is processed, the user context middleware now also returns the chat where the vote took place. Previously, only the user who cast the vote was returned. * Added changelog * Fixed tests * Bump Python version in test
This commit is contained in:
parent
30cee817f4
commit
0c9eeda8a7
4 changed files with 7 additions and 6 deletions
|
|
@ -71,7 +71,7 @@ class UserContextMiddleware(BaseMiddleware):
|
|||
if event.pre_checkout_query:
|
||||
return None, event.pre_checkout_query.from_user, None
|
||||
if event.poll_answer:
|
||||
return None, event.poll_answer.user, None
|
||||
return event.poll_answer.voter_chat, event.poll_answer.user, None
|
||||
if event.my_chat_member:
|
||||
return event.my_chat_member.chat, event.my_chat_member.from_user, None
|
||||
if event.chat_member:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue