Commit 9aa58b2f authored by Dave Cridland's avatar Dave Cridland Committed by daryl herzmann

OF-1422 Handle rejoins with nick-sharing (#908)

This checks to see if any occupant exists with
the same full jid, and if so treats this as a
clientOnlyJoin (ie, rejoin).
parent 30747db4
......@@ -585,7 +585,8 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener {
// Nickname is already used, and not by the same JID
throw new UserAlreadyExistsException();
}
if (occupant.getUserAddress().equals(user.getAddress())) {
// Is this client already joined?
if (occupantsByFullJID.containsKey(user.getAddress())) {
clientOnlyJoin = true; // This user is already an occupant. The client thinks it isn't. (Or else this is a broken gmail).
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment