Parse stanza-id in groupchat correctly

This commit is contained in:
Philipp Hörist 2017-11-11 21:46:00 +01:00
parent 309e844b4e
commit 5236693df9
1 changed files with 8 additions and 4 deletions

View File

@ -148,10 +148,14 @@ class HelperEvent:
if by is None: if by is None:
# We can not verify who set this stanza-id, ignore it. # We can not verify who set this stanza-id, ignore it.
return return
elif not self.conn.get_own_jid().bareMatch(by): if stanza.getType() == 'groupchat':
# by attribute does not match the server, ignore it. if stanza.getFrom().bareMatch(by):
return # by attribute must match the server
return stanza_id return stanza_id
elif self.conn.get_own_jid().bareMatch(by):
# by attribute must match the server
return stanza_id
return
@staticmethod @staticmethod
def get_forwarded_message(stanza): def get_forwarded_message(stanza):