Fix whitelisting multiple chats on events not working

This commit is contained in:
Lonami Exo 2018-02-11 10:30:45 +01:00
parent eca1e8ec87
commit 0633e204c2

View File

@ -149,8 +149,8 @@ class NewMessage(_EventBuilder):
def resolve(self, client):
if hasattr(self.chats, '__iter__') and not isinstance(self.chats, str):
self.chats = set(utils.get_peer_id(x)
for x in client.get_input_entity(self.chats))
self.chats = set(utils.get_peer_id(client.get_input_entity(x))
for x in self.chats)
elif self.chats is not None:
self.chats = {utils.get_peer_id(
client.get_input_entity(self.chats))}
@ -397,8 +397,8 @@ class ChatAction(_EventBuilder):
def resolve(self, client):
if hasattr(self.chats, '__iter__') and not isinstance(self.chats, str):
self.chats = set(utils.get_peer_id(x)
for x in client.get_input_entity(self.chats))
self.chats = set(utils.get_peer_id(client.get_input_entity(x))
for x in self.chats)
elif self.chats is not None:
self.chats = {utils.get_peer_id(
client.get_input_entity(self.chats))}