aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-11-12 20:21:11 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-11-12 20:21:11 +0100
commitfe62ef32aedc0d630a50cd9a92d9b2cbaa969b23 (patch)
treed4ea5552693b82aba29c78500f59d5262ff534a9 /src/main/java
parentf7c2cd480739566c07f5b7023f77ae4899b14090 (diff)
don't add outcasts or non-members in members-only rooms back to list
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/MucOptions.java5
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java6
2 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/MucOptions.java b/src/main/java/eu/siacs/conversations/entities/MucOptions.java
index fa6afcfa..29b94850 100644
--- a/src/main/java/eu/siacs/conversations/entities/MucOptions.java
+++ b/src/main/java/eu/siacs/conversations/entities/MucOptions.java
@@ -435,7 +435,10 @@ public class MucOptions {
if (old != null) {
users.remove(old);
}
- this.users.add(user);
+ if ((!membersOnly() || user.getAffiliation().ranks(Affiliation.MEMBER))
+ && user.getAffiliation().outranks(Affiliation.OUTCAST)){
+ this.users.add(user);
+ }
}
}
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index c1bd59e9..2fb13ce8 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -2128,9 +2128,6 @@ public class XmppConnectionService extends Service {
MucOptions.User user = AbstractParser.parseItem(conversation,child);
if (!user.realJidMatchesAccount()) {
conversation.getMucOptions().addUser(user);
- getAvatarService().clear(conversation);
- updateMucRosterUi();
- updateConversationUi();
}
}
}
@@ -2140,6 +2137,9 @@ public class XmppConnectionService extends Service {
++i;
if (i >= affiliations.length) {
Log.d(Config.LOGTAG,account.getJid().toBareJid()+": retrieved members for "+conversation.getJid().toBareJid()+": "+conversation.getMucOptions().getMembers());
+ getAvatarService().clear(conversation);
+ updateMucRosterUi();
+ updateConversationUi();
}
}
};