diff options
-rw-r--r-- | docs/XEPs.md | 1 | ||||
-rw-r--r-- | src/eu/siacs/conversations/parser/MessageParser.java | 13 |
2 files changed, 9 insertions, 5 deletions
diff --git a/docs/XEPs.md b/docs/XEPs.md index 8d1d0d5c..0dd6a1d7 100644 --- a/docs/XEPs.md +++ b/docs/XEPs.md @@ -1,3 +1,4 @@ +* XEP-0027: Current Jabber OpenPGP Usage * XEP-0030: Service Discovery * XEP-0045: Multi-User Chat * XEP-0048: Bookmarks diff --git a/src/eu/siacs/conversations/parser/MessageParser.java b/src/eu/siacs/conversations/parser/MessageParser.java index 534c9dea..b9fe3c15 100644 --- a/src/eu/siacs/conversations/parser/MessageParser.java +++ b/src/eu/siacs/conversations/parser/MessageParser.java @@ -186,11 +186,13 @@ public class MessageParser extends AbstractParser implements int status; String fullJid; Element forwarded; - if (packet.hasChild("received")) { - forwarded = packet.findChild("received").findChild("forwarded"); + if (packet.hasChild("received", "urn:xmpp:carbons:2")) { + forwarded = packet.findChild("received", "urn:xmpp:carbons:2") + .findChild("forwarded", "urn:xmpp:forward:0"); status = Message.STATUS_RECEIVED; - } else if (packet.hasChild("sent")) { - forwarded = packet.findChild("sent").findChild("forwarded"); + } else if (packet.hasChild("sent", "urn:xmpp:carbons:2")) { + forwarded = packet.findChild("sent", "urn:xmpp:carbons:2") + .findChild("forwarded", "urn:xmpp:forward:0"); status = Message.STATUS_SEND; } else { return null; @@ -392,7 +394,8 @@ public class MessageParser extends AbstractParser implements if (message != null) { message.markUnread(); } - } else if (packet.hasChild("received") || (packet.hasChild("sent"))) { + } else if (packet.hasChild("received", "urn:xmpp:carbons:2") + || (packet.hasChild("sent", "urn:xmpp:carbons:2"))) { message = this.parseCarbonMessage(packet, account); if (message != null) { if (message.getStatus() == Message.STATUS_SEND) { |