Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f5198c0
Optionally return 409 when trying to join a second time
nickvergessen May 15, 2020
5e6a21b
Also support guests to prevent breaking their sessions
nickvergessen May 15, 2020
d5c42d8
Return session id, in call flag and last ping
nickvergessen May 15, 2020
9db6853
Always ask if we can join if we are not reloading the page
nickvergessen May 29, 2020
6b36032
Ask for confirmation to join in case of session conflict
nickvergessen May 29, 2020
cd81c6e
Automatically force join if the session is "old"
nickvergessen May 29, 2020
da78e4c
Add documentation for the conflict handling
nickvergessen May 29, 2020
5bce99b
Leave the room with the old session
nickvergessen May 29, 2020
ee2632b
Further pass on the sessionId to leaveRoomAsParticipant
nickvergessen Jun 15, 2020
61134a0
Handle duplicated sessions more gracefully with the internal signaling
nickvergessen Apr 16, 2020
dd48b52
Better handle 404 error as well as all other undefined scenarios
nickvergessen Apr 16, 2020
9fc01a6
Show session conflict warning when a session joins again for your own…
nickvergessen Jun 15, 2020
9775215
Redirect to a plain page to avoid reconnections
nickvergessen Jun 16, 2020
237d2f5
Send a signal to disconnect the old session before killing it
nickvergessen Jun 16, 2020
5f83e23
Don't show call state when asking to kill the other session
nickvergessen Jun 16, 2020
389d7b6
Trigger a vue event when SessionStorage "joined_conversation" changes
nickvergessen Jun 24, 2020
d54249f
Don't kill the previous session when we navigate away
nickvergessen Jun 24, 2020
eba73a3
Handle the disinvite event properly when the session was kicked
nickvergessen Jun 24, 2020
0f2176b
Add a hack to check if the dialog was closed via the X
nickvergessen Jun 29, 2020
1efead6
If the user has no participant anymore, it was not a conflict
nickvergessen Jun 29, 2020
0c729f0
Fix mixin state also when the component is loaded after the state alr…
nickvergessen Jun 30, 2020
e5c75cb
Update the session and the call flag when force joining
nickvergessen Jul 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a hack to check if the dialog was closed via the X
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Jul 1, 2020
commit 0f2176b6e09ca849914c4ee11715fac19ffaeaea
12 changes: 12 additions & 0 deletions src/services/participantsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ const joinConversation = async(token) => {
}

const confirmForceJoinConversation = async(token) => {
// Little hack to check if the close button was used which we can't disable,
// not listen to when it was used.
const interval = setInterval(function() {
// eslint-disable-next-line no-undef
if ($('.oc-dialog-dim').length === 0) {
clearInterval(interval)
EventBus.$emit('duplicateSessionDetected')
window.location = generateUrl('/apps/spreed')
}
}, 3000)

await OC.dialogs.confirmDestructive(
t('spreed', 'You are trying to join a conversation while having an active session in another window or device. This is currently not supported by Nextcloud Talk. What do you want to do?'),
t('spreed', 'Duplicate session'),
Expand All @@ -86,6 +97,7 @@ const confirmForceJoinConversation = async(token) => {
cancel: t('spreed', 'Leave this page'),
},
decision => {
clearInterval(interval)
if (!decision) {
// Cancel
EventBus.$emit('duplicateSessionDetected')
Expand Down