diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-02-05 22:33:39 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-02-05 22:33:39 +0100 |
commit | aa42eb544a1ebf99dc52d71c917b899d1fce628d (patch) | |
tree | bb5523f3342823faf7dce746d298f2650936d03a /src/de/gultsch/chat/xmpp | |
parent | 4670585e7a474d878c823df6de1846980b5c65d3 (diff) |
basic muc support. reworked contact list stuff
Diffstat (limited to '')
-rw-r--r-- | src/de/gultsch/chat/xmpp/MessagePacket.java | 7 | ||||
-rw-r--r-- | src/de/gultsch/chat/xmpp/XmppConnection.java | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/de/gultsch/chat/xmpp/MessagePacket.java b/src/de/gultsch/chat/xmpp/MessagePacket.java index ab0c05c3..5da76152 100644 --- a/src/de/gultsch/chat/xmpp/MessagePacket.java +++ b/src/de/gultsch/chat/xmpp/MessagePacket.java @@ -6,6 +6,7 @@ public class MessagePacket extends Element { public static final int TYPE_CHAT = 0; public static final int TYPE_UNKNOWN = 1; public static final int TYPE_NO = 2; + public static final int TYPE_GROUPCHAT = 3; private MessagePacket(String name) { super(name); @@ -51,7 +52,9 @@ public class MessagePacket extends Element { case TYPE_CHAT: this.setAttribute("type","chat"); break; - + case TYPE_GROUPCHAT: + this.setAttribute("type", "groupchat"); + break; default: this.setAttribute("type","chat"); break; @@ -65,6 +68,8 @@ public class MessagePacket extends Element { } if (type.equals("chat")) { return TYPE_CHAT; + } else if (type.equals("groupchat")) { + return TYPE_GROUPCHAT; } else { return TYPE_UNKNOWN; } diff --git a/src/de/gultsch/chat/xmpp/XmppConnection.java b/src/de/gultsch/chat/xmpp/XmppConnection.java index 56a0acb0..c105bbb4 100644 --- a/src/de/gultsch/chat/xmpp/XmppConnection.java +++ b/src/de/gultsch/chat/xmpp/XmppConnection.java @@ -340,6 +340,7 @@ public class XmppConnection implements Runnable { public void sendPresencePacket(PresencePacket packet) { tagWriter.writeElement(packet); + Log.d(LOGTAG,account.getJid()+": sending: "+packet.toString()); } public void setOnMessagePacketReceivedListener(OnMessagePacketReceived listener) { |