Print correct archive jid in log message

This commit is contained in:
Philipp Hörist 2018-02-21 22:21:35 +01:00
parent 0c7f1937cf
commit 015d99ea63
2 changed files with 6 additions and 2 deletions

View File

@ -1278,8 +1278,12 @@ class MessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
# We do this because of MUC History messages
type_ = self.stanza.getType()
if type_ == 'groupchat' or self.self_message or self.muc_pm:
if type_ == 'groupchat':
archive_jid = self.stanza.getFrom().getStripped()
else:
archive_jid = self.conn.get_own_jid()
if app.logger.find_stanza_id(account,
self.stanza.getFrom().getStripped(),
archive_jid,
self.unique_id,
groupchat=type_ == 'groupchat'):
return

View File

@ -1201,7 +1201,7 @@ class Logger:
if result is not None:
log.info('Found duplicated message, stanza-id: %s, origin-id: %s, '
'archive-jid: %s, account: %s', stanza_id, origin_id, archive_id, account_id)
'archive-jid: %s, account: %s', stanza_id, origin_id, archive_jid, account_id)
return True
return False