Commit 7effdb23 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Fixed problem when renaming occupant's nickname. JM-186


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1027 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3540a9e7
......@@ -1247,9 +1247,13 @@ public class MUCRoomImpl implements MUCRoom {
public void nicknameChanged(String oldNick, String newNick) {
// Associate the existing MUCRole with the new nickname
occupants.put(newNick.toLowerCase(), occupants.get(oldNick.toLowerCase()));
// Remove the old nickname
occupants.remove(oldNick.toLowerCase());
MUCRole occupant = occupants.get(oldNick.toLowerCase());
// Check that we still have an occupant for the old nickname
if (occupant != null) {
occupants.put(newNick.toLowerCase(), occupant);
// Remove the old nickname
occupants.remove(oldNick.toLowerCase());
}
}
public void changeSubject(Message packet, MUCRole role) throws ForbiddenException {
......
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