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 Element result = MessageArchiveService.Version.findResult(original);
|
||||||
final MessageArchiveService.Query query = result == null ? null : mXmppConnectionService.getMessageArchiveService().findQuery(result.getAttribute("queryid"));
|
final MessageArchiveService.Query query = result == null ? null : mXmppConnectionService.getMessageArchiveService().findQuery(result.getAttribute("queryid"));
|
||||||
if (query != null && query.validFrom(original.getFrom())) {
|
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) {
|
if (f == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -377,6 +377,9 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||||
packet = f.first;
|
packet = f.first;
|
||||||
serverMsgId = result.getAttribute("id");
|
serverMsgId = result.getAttribute("id");
|
||||||
query.incrementMessageCount();
|
query.incrementMessageCount();
|
||||||
|
if (handleErrorMessage(account, packet)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else if (query != null) {
|
} 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 from invalid sender");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue