From 3cffc8ab7c6dcc816548f5973d33e9e350c0aa04 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 19 Jun 2024 10:02:23 -0500 Subject: [PATCH] Allow accepting a single session Maybe I meant that you should always use chat.acceptCall() but we allow hangup of just one, and the session is what is passed, so let's allow this for now. --- snikket/jingle/Session.hx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/snikket/jingle/Session.hx b/snikket/jingle/Session.hx index 94769db..974b9e5 100644 --- a/snikket/jingle/Session.hx +++ b/snikket/jingle/Session.hx @@ -17,8 +17,7 @@ interface Session { public var sid (get, null): String; @:allow(snikket) private function initiate(stanza: Stanza): InitiatedSession; - @:allow(snikket) - private function accept(): Void; + public function accept(): Void; public function hangup(): Void; @:allow(snikket) private function retract(): Void; @@ -281,8 +280,7 @@ class InitiatedSession implements Session { trace("Tried to retract session in wrong state: " + sid, this); } - @:allow(snikket) - private function accept() { + public function accept() { if (accepted || remoteDescription == null) return; accepted = true; final audio = remoteDescription.media.find((m) -> m.media == "audio") != null;