parse error messages from MAM results
This commit is contained in:
parent
6590dc922f
commit
97fe9fa01f
|
@ -369,7 +369,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
|||
final Element result = MessageArchiveService.Version.findResult(original);
|
||||
final MessageArchiveService.Query query = result == null ? null : mXmppConnectionService.getMessageArchiveService().findQuery(result.getAttribute("queryid"));
|
||||
if (query != null && query.validFrom(original.getFrom())) {
|
||||
Pair<MessagePacket, Long> f = original.getForwardedMessagePacket("result", query.version.namespace);
|
||||
final Pair<MessagePacket, Long> f = original.getForwardedMessagePacket("result", query.version.namespace);
|
||||
if (f == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -377,6 +377,9 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
|||
packet = f.first;
|
||||
serverMsgId = result.getAttribute("id");
|
||||
query.incrementMessageCount();
|
||||
if (handleErrorMessage(account, packet)) {
|
||||
return;
|
||||
}
|
||||
} else if (query != null) {
|
||||
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": received mam result from invalid sender");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue