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:
# We can not verify who set this stanza-id, ignore it.
return
elif not self.conn.get_own_jid().bareMatch(by):
# by attribute does not match the server, ignore it.
return
if stanza.getType() == 'groupchat':
if stanza.getFrom().bareMatch(by):
# by attribute must match the server
return stanza_id
elif self.conn.get_own_jid().bareMatch(by):
# by attribute must match the server
return stanza_id
return
@staticmethod
def get_forwarded_message(stanza):