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.
This commit is contained in:
Daniel Gultsch 2018-11-30 16:28:41 +01:00
parent 6381f8a7f7
commit 846bba96f2

View file

@ -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);