From dc72bc5bc3383fac3a93ac2ecd5ce456669eb6cb Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 8 Oct 2020 20:21:53 +0200 Subject: [PATCH] extend logging for not finding query --- .../java/eu/siacs/conversations/parser/MessageParser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 07541e7cb..7812faa91 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -367,7 +367,8 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece return; } final Element result = MessageArchiveService.Version.findResult(original); - final MessageArchiveService.Query query = result == null ? null : mXmppConnectionService.getMessageArchiveService().findQuery(result.getAttribute("queryid")); + final String queryId = result == null ? null : result.getAttribute("queryid"); + final MessageArchiveService.Query query = queryId == null ? null : mXmppConnectionService.getMessageArchiveService().findQuery(queryId); if (query != null && query.validFrom(original.getFrom())) { final Pair f = original.getForwardedMessagePacket("result", query.version.namespace); if (f == null) { @@ -381,7 +382,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece return; } } else if (query != null) { - Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": received mam result from invalid sender"); + Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": received mam result with invalid from ("+original.getFrom()+") or queryId ("+queryId+")"); return; } else if (original.fromServer(account)) { Pair f;