diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-07-28 14:44:11 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-07-28 14:44:11 +0200 |
commit | 6b8e1ecb9532509ac6bca6ca3665f6ac3f560332 (patch) | |
tree | c5cfd97c1ce276342e9a88270e908b33336cdbe7 | |
parent | 36d31e7e24cf6eb073bbd02b5bfea6419c634190 (diff) |
log reason for message failure
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/MessageParser.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 6e7b3276..f0659511 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -202,6 +202,13 @@ public class MessageParser extends AbstractParser implements if (packet.getType() == MessagePacket.TYPE_ERROR) { Jid from = packet.getFrom(); if (from != null) { + Element error = packet.findChild("error"); + String text = error == null ? null : error.findChildContent("text"); + if (text != null) { + Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": sending message to "+ from+ " failed - " + text); + } else if (error != null) { + Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": sending message to "+ from+ " failed - " + error); + } Message message = mXmppConnectionService.markMessage(account, from.toBareJid(), packet.getId(), |