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:
Christian Schneppe 2018-12-04 19:24:23 +01:00
parent 6c2e3b91a4
commit e8ed23f58c

View file

@ -250,7 +250,7 @@ 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);
}
}