1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 14:22:05 +01:00

Merge pull request #242 from igniterealtime/4.3_MUC-leave-without-nickname

fix: Prevent attempt to construct invalid address
This commit is contained in:
Florian Schmaus 2018-06-12 11:05:27 +02:00 committed by GitHub
commit 021ebf8ab3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -756,6 +756,10 @@ public class MultiUserChat {
// throw. // throw.
userHasLeft(); userHasLeft();
if (nickname == null) {
return;
}
// We leave a room by sending a presence packet where the "to" // We leave a room by sending a presence packet where the "to"
// field is in the form "roomName@service/nickname" // field is in the form "roomName@service/nickname"
Presence leavePresence = new Presence(Presence.Type.unavailable); Presence leavePresence = new Presence(Presence.Type.unavailable);