Skip to content

Commit

Permalink
Dev 2.x chat_type filter fix (#1027)
Browse files Browse the repository at this point in the history
* Added missing params to chat shortcut functions create_invite_link, edit_invite_link

* Added missing ChatJoinRequest to check function of a ChatTypeFilter
  • Loading branch information
dmitriprank committed Nov 7, 2022
1 parent 98ae851 commit 87c0458
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aiogram/dispatcher/filters/builtin.py
Expand Up @@ -751,6 +751,8 @@ async def check(self, obj: Union[Message, CallbackQuery, ChatMemberUpdated, Inli
chat_type = obj.chat.type
elif isinstance(obj, InlineQuery):
chat_type = obj.chat_type
elif isinstance(obj, ChatJoinRequest):
chat_type = obj.chat.type
else:
warnings.warn("ChatTypeFilter doesn't support %s as input", type(obj))
return False
Expand Down

0 comments on commit 87c0458

Please sign in to comment.