git » sdk » commit c2f217f

Can we call this MUC?

author Stephen Paul Weber
2025-03-04 16:18:51 UTC
committer Stephen Paul Weber
2025-03-04 16:18:51 UTC
parent 243cede0a893fe3bd20b19c91f6c0f73a0e28eaa

Can we call this MUC?

Not if we could call any participant, but can we call the MUC itself is
really the question here.

snikket/Chat.hx +8 -0

diff --git a/snikket/Chat.hx b/snikket/Chat.hx
index 3cf041a..3bdc7b5 100644
--- a/snikket/Chat.hx
+++ b/snikket/Chat.hx
@@ -1144,6 +1144,14 @@ class Channel extends Chat {
 		return !inSync || !livePresence();
 	}
 
+	override public function canAudioCall():Bool {
+		return disco?.features?.contains("urn:xmpp:jingle:apps:rtp:audio") ?? false;
+	}
+
+	override public function canVideoCall():Bool {
+		return disco?.features?.contains("urn:xmpp:jingle:apps:rtp:video") ?? false;
+	}
+
 	private function nickInUse() {
 		return _nickInUse ?? client.displayName();
 	}