From 9486fd61769195407f34ab73a25a430305c280bb Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Fri, 2 Sep 2022 16:13:49 +0200 Subject: [PATCH] [muc] Remove stale comment from MultiUserChat.userHashLeft() Set started with Smack 4.4 to set myRoomJid to null, introduced by ab2822be3ef3 ("muc: also set myRoomJid to null if we have left the room"), however the code comment still states that we "do not reset nickname here" (and myRoomJid contains the nickname as its resourcepart). Reported-by: Damian Minkov --- .../main/java/org/jivesoftware/smackx/muc/MultiUserChat.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java index 2bddb31e7..2c6316854 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java @@ -2201,9 +2201,6 @@ public class MultiUserChat { * Remove all callbacks and resources necessary when the user has left the room for some reason. */ private synchronized void userHasLeft() { - // We do not reset nickname here, in case this method has been called erroneously, it should still be possible - // to call leave() in order to resync the state. And leave() requires the nickname to send the unsubscribe - // presence. occupantsMap.clear(); myRoomJid = null; // Update the list of joined rooms