diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2018-11-30 18:28:41 +0300 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2018-11-30 18:28:43 +0300 |
commit | 846bba96f2dc7460cef28952886bfe2a490e115f (patch) | |
tree | 6687f87113f785f4def2a765f55214a99a273240 /src | |
parent | 6381f8a7f7ab89f9ee6821ccfdc10a412e387139 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/MucOptions.java | 3 |
1 files changed, 2 insertions, 1 deletions
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); |