git » sdk » commit 8aa0a57

Do not include MUC disco in participants

author Stephen Paul Weber
2025-03-26 18:25:18 UTC
committer Stephen Paul Weber
2025-03-26 18:25:18 UTC
parent 03015e0e23e158483913bdcd000f32352c19b193

Do not include MUC disco in participants

snikket/Chat.hx +1 -1

diff --git a/snikket/Chat.hx b/snikket/Chat.hx
index 5802fb4..6110091 100644
--- a/snikket/Chat.hx
+++ b/snikket/Chat.hx
@@ -1228,7 +1228,7 @@ class Channel extends Chat {
 	@HaxeCBridge.noemit // on superclass as abstract
 	public function getParticipants() {
 		final jid = JID.parse(chatId);
-		return { iterator: () -> presence.keys() }.map((resource) -> new JID(jid.node, jid.domain, resource).asString());
+		return { iterator: () -> presence.keys() }.filter(resource -> resource != null).map((resource) -> new JID(jid.node, jid.domain, resource).asString());
 	}
 
 	@HaxeCBridge.noemit // on superclass as abstract