diff options
author | Daniel Gultsch <inputmice@siacs.eu> | 2015-01-04 12:37:22 +0100 |
---|---|---|
committer | Daniel Gultsch <inputmice@siacs.eu> | 2015-01-04 12:37:22 +0100 |
commit | 5c190487bc04e5dcb9b12a49d2447d441860d990 (patch) | |
tree | 6b0f7e3b57117da5d7cf2a45f92bc2082dd15cee /src | |
parent | e32a927300a96fc59adcabb2ebc16318e67de226 (diff) |
deal with prosodys muc namespace tagging of messages
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/MessageParser.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 44cda261..65a8f9e6 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -245,6 +245,10 @@ public class MessageParser extends AbstractParser implements return null; } } + if (message.hasChild("x","http://jabber.org/protocol/muc#user") + && "chat".equals(message.getAttribute("type"))) { + return null; + } Conversation conversation = mXmppConnectionService .findOrCreateConversation(account, fullJid.toBareJid(), false); String pgpBody = getPgpBody(message); @@ -482,7 +486,6 @@ public class MessageParser extends AbstractParser implements public void onMessagePacketReceived(Account account, MessagePacket packet) { Message message = null; this.parseNick(packet, account); - if ((packet.getType() == MessagePacket.TYPE_CHAT || packet.getType() == MessagePacket.TYPE_NORMAL)) { if ((packet.getBody() != null) && (packet.getBody().startsWith("?OTR"))) { @@ -490,9 +493,7 @@ public class MessageParser extends AbstractParser implements if (message != null) { message.markUnread(); } - } else if (packet.hasChild("body") - && !(packet.hasChild("x", - "http://jabber.org/protocol/muc#user"))) { + } else if (packet.hasChild("body")) { message = this.parseChat(packet, account); if (message != null) { message.markUnread(); |