git » sdk » commit fd3cd01

JID resource can be null

author Stephen Paul Weber
2025-06-24 17:48:54 UTC
committer Stephen Paul Weber
2025-06-24 17:48:54 UTC
parent 697d0e39ce68b8311647ef76b9ab8312d85d38cf

JID resource can be null

snikket/Chat.hx +1 -1

diff --git a/snikket/Chat.hx b/snikket/Chat.hx
index bd552ef..68e4886 100644
--- a/snikket/Chat.hx
+++ b/snikket/Chat.hx
@@ -1260,7 +1260,7 @@ class Channel extends Chat {
 		} else {
 			final nick = JID.parse(participantId).resource;
 			final placeholderUri = Color.defaultPhoto(participantId, nick == null ? " " : nick.charAt(0));
-			return new Participant(nick, null, placeholderUri, false);
+			return new Participant(nick ?? "", null, placeholderUri, false);
 		}
 	}