diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-11-12 22:43:12 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-11-12 22:43:12 +0100 |
commit | 4b16922cbbee2bd1d45ca2ba4796c5bc9036fdf6 (patch) | |
tree | d61b99e262b88e5a716334a8b75511f7fa6ccf9f /src/main/java/de/pixart/messenger | |
parent | 30fd34360edcf2a60de21e620cfb27afaa65eecc (diff) |
don't add outcasts or non-members in members-only rooms back to list
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/MucOptions.java | 5 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/MucOptions.java b/src/main/java/de/pixart/messenger/entities/MucOptions.java index 7b341c916..7e2c770cd 100644 --- a/src/main/java/de/pixart/messenger/entities/MucOptions.java +++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java @@ -434,7 +434,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/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index ca4018e71..1654a913c 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -2260,9 +2260,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(); } } } @@ -2272,6 +2269,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(); } } }; |