git » sdk » commit 5eda91d

Trigger retract event when we hang up also

author Stephen Paul Weber
2024-04-16 13:55:43 UTC
committer Stephen Paul Weber
2024-04-16 13:55:43 UTC
parent 6ed5366d27bddddae9b982a3c57b48e9e88feb6c

Trigger retract event when we hang up also

snikket/jingle/Session.hx +1 -1

diff --git a/snikket/jingle/Session.hx b/snikket/jingle/Session.hx
index 3a124f5..a6b183e 100644
--- a/snikket/jingle/Session.hx
+++ b/snikket/jingle/Session.hx
@@ -286,7 +286,6 @@ class InitiatedSession implements Session {
 				.up().up().up()
 		);
 		terminate();
-		client.trigger("call/retract", { chatId: counterpart.asBare().asString() });
 	}
 
 	public function initiate(stanza: Stanza) {
@@ -303,6 +302,7 @@ class InitiatedSession implements Session {
 			}
 		}
 		pc = null;
+		client.trigger("call/retract", { chatId: counterpart.asBare().asString() });
 	}
 
 	public function contentAdd(stanza: Stanza) {