aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-04 02:51:01 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-04 02:51:01 +0100
commit8e4be5256ea5b4e47225a84604720a15b45d3f39 (patch)
tree36005a1a78536e5bfa1fb5ebc3b4d43feddf0d60 /src/eu/siacs/conversations/entities
parent69af009c88c4ffa0ea3275c4b875a13e0ecdcddc (diff)
Muc Options even more awesome
Diffstat (limited to 'src/eu/siacs/conversations/entities')
-rw-r--r--src/eu/siacs/conversations/entities/MucOptions.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/entities/MucOptions.java b/src/eu/siacs/conversations/entities/MucOptions.java
index b3b53e1d..add56fb6 100644
--- a/src/eu/siacs/conversations/entities/MucOptions.java
+++ b/src/eu/siacs/conversations/entities/MucOptions.java
@@ -3,6 +3,7 @@ package eu.siacs.conversations.entities;
import java.util.ArrayList;
import java.util.List;
+import eu.siacs.conversations.entities.MucOptions.User;
import eu.siacs.conversations.xml.Element;
import eu.siacs.conversations.xmpp.PresencePacket;
import android.annotation.SuppressLint;
@@ -75,6 +76,7 @@ public class MucOptions {
private boolean isOnline = false;
private int error = 0;
private OnRenameListener renameListener = null;
+ private User self = new User();
public void deleteUser(String name) {
@@ -107,12 +109,14 @@ public class MucOptions {
user.setAffiliation(item.getAttribute("affiliation"));
user.setRole(item.getAttribute("role"));
user.setName(name);
- addUser(user);
Log.d("xmppService","nick: "+getNick());
Log.d("xmppService","name: "+name);
if (name.equals(getNick())) {
this.isOnline = true;
this.error = 0;
+ self = user;
+ } else {
+ addUser(user);
}
} else if (type.equals("unavailable")) {
Log.d("xmppService","name: "+name);
@@ -179,4 +183,8 @@ public class MucOptions {
this.error = 0;
this.isOnline = false;
}
+
+ public User getSelf() {
+ return self;
+ }
} \ No newline at end of file