diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-05-10 13:57:27 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-05-10 13:57:27 +0300 |
commit | 9a4476b32ee082c63c0ecaadee0e54a4f083513f (patch) | |
tree | 91b6c9ae46e53cd419f3f1808ffe2427791ed149 /src/mixins | |
parent | b858f28c2a041e409dea79f80eb4d94597c88541 (diff) |
Bring back redirect to not-found page
Fixes issues with stray WebRTC connections despite session termination.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'src/mixins')
-rw-r--r-- | src/mixins/sessionIssueHandler.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mixins/sessionIssueHandler.js b/src/mixins/sessionIssueHandler.js index 7d3c487d6..2c14ccfa2 100644 --- a/src/mixins/sessionIssueHandler.js +++ b/src/mixins/sessionIssueHandler.js @@ -42,7 +42,7 @@ const sessionIssueHandler = { }, methods: { - duplicateSessionTriggered() { + redirectTo(url) { this.isLeavingAfterSessionIssue = true SessionStorage.removeItem('joined_conversation') // Need to delay until next tick, otherwise the PreventUnload is still being triggered @@ -51,13 +51,17 @@ const sessionIssueHandler = { // FIXME: can't use router push as it somehow doesn't clean up // fully and leads the other instance where "Join here" was clicked // to redirect to "not found" - window.location = generateUrl('/apps/spreed/duplicate-session') + window.location = url }) }, + duplicateSessionTriggered() { + this.redirectTo(generateUrl('/apps/spreed/duplicate-session')) + }, + deletedSessionTriggered() { - this.$router.push({ name: 'notfound', params: { skipLeaveWarning: true } }) - this.$store.dispatch('updateToken', '') + // workaround: force page refresh to kill stray WebRTC connections + this.redirectTo(generateUrl('/apps/spreed/not-found')) }, }, } |