Fixed: not all messages in a batch were returned to the bot engine

This commit is contained in:
nicobo 2020-05-16 00:09:55 +02:00
parent 4da5d98877
commit f4464aa0e3
No known key found for this signature in database
GPG key ID: 2581E71C5FA5285F

View file

@ -135,14 +135,12 @@ class SignalChatter(Chatter):
if envelope['source'] == self.recipient:
logging.debug("<<< %s" % message)
self.bot.onMessage(message)
return True
else:
logging.debug("Discarding message not from recipient %s"%self.recipient)
elif self.group:
if dataMessage['groupInfo'] and dataMessage['groupInfo']['groupId']:
logging.debug("<<< %s" % message)
self.bot.onMessage(message)
return True
else:
logging.debug("Discarding message not from group %s" % self.group)
else:
@ -154,8 +152,6 @@ class SignalChatter(Chatter):
else:
logging.debug("Discarding message that was sent before I started")
return False
# if __name__ == '__main__':