Fix _document_by_attribute calls using cond

This commit is contained in:
Lonami Exo 2018-12-03 08:49:24 +01:00
parent b8912ea0aa
commit 4d8f078ad9

View File

@ -764,7 +764,7 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC):
if doc:
for attr in doc.attributes:
if isinstance(attr, kind):
if not condition or condition(doc):
if not condition or condition(attr):
return doc
return None