From 846bba96f2dc7460cef28952886bfe2a490e115f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 30 Nov 2018 16:28:41 +0100 Subject: [PATCH] remove role=none participant when first online participant joins in anticipations for muc services using registered nicks (and putting nicks into the member list even if that user is offline) we need to remove that 'fake' user from the online list when the real user comes online. --- src/main/java/eu/siacs/conversations/entities/MucOptions.java | 3 ++- 1 file changed, 2 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 7aae196a8..2a751d95e 100644 --- a/src/main/java/eu/siacs/conversations/entities/MucOptions.java +++ b/src/main/java/eu/siacs/conversations/entities/MucOptions.java @@ -250,12 +250,13 @@ public class MucOptions { old = findUserByRealJid(user.realJid); realJidFound = old != null; synchronized (users) { - if (old != null && old.fullJid == null) { + if (old != null && (old.fullJid == null || old.role == Role.NONE)) { users.remove(old); } } } old = findUserByFullJid(user.getFullJid()); + synchronized (this.users) { if (old != null) { users.remove(old);