mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fix ContentTypeFilter
Now the ContentTypeFilter works correctly with single elements.
This commit is contained in:
parent
78d75bccef
commit
a026100353
1 changed files with 2 additions and 0 deletions
|
|
@ -444,6 +444,8 @@ class ContentTypeFilter(BoundFilter):
|
|||
default = types.ContentTypes.TEXT
|
||||
|
||||
def __init__(self, content_types):
|
||||
if isinstance(content_types, str):
|
||||
content_types = (content_types,)
|
||||
self.content_types = content_types
|
||||
|
||||
async def check(self, message):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue