Skip to content

Commit

Permalink
Allow accepting a single session
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
singpolyma committed Jun 19, 2024
1 parent b2dcdaf commit 3cffc8a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions snikket/jingle/Session.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3cffc8a

Please sign in to comment.