From e127ba93611fdc246217bbf90e6f56821b60a512 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 1 Dec 2016 19:57:40 +0100 Subject: don't use own jid joined from another client to generate muc title --- src/main/java/eu/siacs/conversations/entities/MucOptions.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/MucOptions.java b/src/main/java/eu/siacs/conversations/entities/MucOptions.java index 93925299..bbc3e370 100644 --- a/src/main/java/eu/siacs/conversations/entities/MucOptions.java +++ b/src/main/java/eu/siacs/conversations/entities/MucOptions.java @@ -401,11 +401,13 @@ public class MucOptions { break; } } + boolean self = user.realJid != null && user.realJid.equals(account.getJid().toBareJid()); if (membersOnly() && nonanonymous() && user.affiliation.ranks(Affiliation.MEMBER) && user.realJid != null - && !realJidInMuc) { + && !realJidInMuc + && !self) { user.role = Role.NONE; user.avatar = null; user.fullJid = null; @@ -517,6 +519,7 @@ public class MucOptions { public List getUsers(int max) { ArrayList subset = new ArrayList<>(); HashSet jids = new HashSet<>(); + jids.add(account.getJid().toBareJid()); synchronized (users) { for(User user : users) { if (user.getRealJid() == null || jids.add(user.getRealJid())) { -- cgit v1.2.3