diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-06-06 18:49:35 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-06-06 18:49:35 +0200 |
commit | 246776067a3cf4d996e60551c7e59278b83427f1 (patch) | |
tree | ba6551c379a2fb1c4d1f1238fc0079c59dded414 /src/eu/siacs/conversations/services | |
parent | 476ab656ef0a50b081d92750b8b4251652ef4624 (diff) |
put xep333 parsing into parser class
Diffstat (limited to 'src/eu/siacs/conversations/services')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 6b9ffcf7..55e727f9 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -178,30 +178,7 @@ public class XmppConnectionService extends Service { mMessageParser.parseError(packet, account); return; } else if (packet.getType() == MessagePacket.TYPE_NORMAL) { - if (packet.hasChild("displayed","urn:xmpp:chat-markers:0")) { - String id = packet.findChild("displayed","urn:xmpp:chat-markers:0").getAttribute("id"); - String[] fromParts = packet.getFrom().split("/"); - markMessage(account,fromParts[0], id, Message.STATUS_SEND_DISPLAYED); - Log.d(LOGTAG,"message was displayed by contact"); - } else if (packet.hasChild("received","urn:xmpp:chat-markers:0")) { - String id = packet.findChild("received","urn:xmpp:chat-markers:0").getAttribute("id"); - String[] fromParts = packet.getFrom().split("/"); - markMessage(account,fromParts[0], id, Message.STATUS_SEND_RECEIVED); - } else if (packet.hasChild("x")) { - Element x = packet.findChild("x"); - if (x.hasChild("invite")) { - findOrCreateConversation(account, packet.getFrom(), - true); - if (convChangedListener != null) { - convChangedListener.onConversationListChanged(); - } - Log.d(LOGTAG, - "invitation received to " + packet.getFrom()); - } - - } else { - //Log.d(LOGTAG, "unparsed message " + packet.toString()); - } + mMessageParser.parseNormal(packet, account); } if ((message == null) || (message.getBody() == null)) { return; |