aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/xmpp/MessagePacket.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-05 22:33:39 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-05 22:33:39 +0100
commitaa42eb544a1ebf99dc52d71c917b899d1fce628d (patch)
treebb5523f3342823faf7dce746d298f2650936d03a /src/de/gultsch/chat/xmpp/MessagePacket.java
parent4670585e7a474d878c823df6de1846980b5c65d3 (diff)
basic muc support. reworked contact list stuff
Diffstat (limited to 'src/de/gultsch/chat/xmpp/MessagePacket.java')
-rw-r--r--src/de/gultsch/chat/xmpp/MessagePacket.java7
1 files changed, 6 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;
}