mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix MessageRead had blacklist_chat=None and not False
This was causing the checks against chats to fail. In addition to that, before setting the attribute, it is now casted to bool to prevent more issues like this in the future (or if users use non-boolean values).
This commit is contained in:
parent
c95467ea3e
commit
34a8140ff0
|
@ -69,7 +69,7 @@ class EventBuilder(abc.ABC):
|
|||
|
||||
def __init__(self, chats=None, *, blacklist_chats=False, func=None):
|
||||
self.chats = chats
|
||||
self.blacklist_chats = blacklist_chats
|
||||
self.blacklist_chats = bool(blacklist_chats)
|
||||
self.resolved = False
|
||||
self.func = func
|
||||
self._resolve_lock = None
|
||||
|
|
|
@ -15,7 +15,7 @@ class MessageRead(EventBuilder):
|
|||
when messages you sent are read by someone else will fire it.
|
||||
"""
|
||||
def __init__(
|
||||
self, chats=None, *, blacklist_chats=None, func=None, inbox=False):
|
||||
self, chats=None, *, blacklist_chats=False, func=None, inbox=False):
|
||||
super().__init__(chats, blacklist_chats=blacklist_chats, func=func)
|
||||
self.inbox = inbox
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user