mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fixed chat and user constraints
This commit is contained in:
parent
f2684e6e84
commit
1df2790048
1 changed files with 2 additions and 2 deletions
|
|
@ -36,8 +36,8 @@ class FSMContextMiddleware(BaseMiddleware[Update]):
|
|||
def _resolve_context(self, data: Dict[str, Any]) -> Optional[FSMContext]:
|
||||
user = data.get("event_from_user")
|
||||
chat = data.get("event_chat")
|
||||
user_id = chat.id if chat else None
|
||||
chat_id = user.id if user else None
|
||||
chat_id = chat.id if chat else None
|
||||
user_id = user.id if user else None
|
||||
|
||||
if chat_id is None:
|
||||
chat_id = user_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue