diff options
author | Joas Schilling <coding@schilljs.com> | 2017-11-16 11:24:56 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-11-16 11:24:56 +0100 |
commit | d5ea8734cf9af8141b9205d4b043deec4fd6349b (patch) | |
tree | 98ced22886a99c57b40a6bf621f6fd41bc92b865 | |
parent | 06b62d8c56c377515d3323dd7a1a2a73725941d5 (diff) |
also leave the room when the user navigates away
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | js/calls.js | 1 | ||||
-rw-r--r-- | js/signaling.js | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/js/calls.js b/js/calls.js index 3caa52779..e9353938b 100644 --- a/js/calls.js +++ b/js/calls.js @@ -116,6 +116,7 @@ if (signaling) { // We currently only support a single active call. signaling.leaveCurrentCall(); + signaling.leaveCurrentRoom(); } }, showRoomDeletedMessage: function(deleter) { diff --git a/js/signaling.js b/js/signaling.js index 1fbc37439..af7c13c65 100644 --- a/js/signaling.js +++ b/js/signaling.js @@ -81,9 +81,9 @@ }; SignalingBase.prototype.leaveCurrentRoom = function() { - if (this.currentCallToken) { - this.leaveRoom(this.currentCallToken); - this.currentCallToken = null; + if (this.currentRoomToken) { + this.leaveRoom(this.currentRoomToken); + this.currentRoomToken = null; } }; |