Skip to content

Conversation

@nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented May 15, 2020

Ref #3415

@nickvergessen nickvergessen added 3. to review bug feature: api 🛠️ OCS API for conversations, chats and participants labels May 15, 2020
@nickvergessen nickvergessen added this to the 💚 Next Major (20) milestone May 15, 2020
@nickvergessen nickvergessen changed the title Bugfix/3415/conflict on joining a second time "409 Conflict" on joining a second time in the same conversation May 15, 2020
@nickvergessen nickvergessen force-pushed the bugfix/3415/conflict-on-joining-a-second-time branch from 230c01f to 634b0f8 Compare May 29, 2020 08:42
@nickvergessen nickvergessen marked this pull request as ready for review May 29, 2020 08:44
@nickvergessen
Copy link
Member Author

This is part 1 of solving #3415

It asks the user whether they want to join a conversation when the previous session pinged in the last 40 seconds (or 60 when it was/is in a call). Reloading within the same tab will always force join automatically.

Part 2 is handling the previous session, in case the user picked the "force join" option. That will be handled in #3338

@nickvergessen
Copy link
Member Author

Oh, missed to leave the old session on the signaling server in case of a force join

@nickvergessen nickvergessen force-pushed the bugfix/3415/conflict-on-joining-a-second-time branch from c5f6744 to a0aad3f Compare June 15, 2020 15:04
@nickvergessen
Copy link
Member Author

nickvergessen commented Jun 15, 2020

Now works also acceptable while chatting with the HPB (with nextcloud/server#21417 applied):

Bildschirmfoto von 2020-06-15 17-00-25

Todo:

  • Check behaviour when in a call

@nickvergessen
Copy link
Member Author

nickvergessen commented Jun 16, 2020

Remaining issue:

  • The "new" sessions UI shows as "isInCall" while the question is prompted and then toggles out of the call when clicking anything. I guess we should set the "isInCall" only when the current window/session joined the call.

@nickvergessen
Copy link
Member Author

Ready to review 🎉

@nickvergessen
Copy link
Member Author

/backport to stable19

Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be something broken in my setup, because the only thing that works for me is trying to join the same conversation in another tab as a user with the HPB but staying in the previous one. Everything else has some kind of issue.

  • With HPB:
    • With a user:
      • Open the same conversation in another tab and choose Join here: the previous tab is redirected to Duplicate session, but the participant is shown as not connected in the new tab.
    • With a guest:
      • Open the same conversation in another tab and choose Join here: the previous tab just stays in the conversation (although in the browser console it can be seen that is connected and disconnected from the external signaling server again and again).
      • Open the same conversation in another tab and choose Leave this page: the new tab is redirected to apps/spreed (which shows the login screen rather than the Duplicate session message)
  • Without HPB:
    • With a user:
      • Open the same conversation in another tab and choose Join here: both the previous tab and the new tab are redirected to Duplicate session
      • Open the same conversation in another tab and choose Leave this page: the previous tab is redirected to Duplicate session (but only sometimes, other times it works)
    • With a guest:
      • Open the same conversation in another tab and choose Join here: both the previous tab and the new tab are redirected to apps/spreed
      • Open the same conversation in another tab and choose Leave this page: the new tab is redirected to apps/spreed

Additionally, if a conversation is created and a call is immediately started in that conversation the UI will not change to the call view.

@nickvergessen

This comment has been minimized.

Note: This uses the browsers sessionStorage not the browserStorage.
As per https://stackoverflow.com/q/20325763 this is NOT shared between tabs.
For us this is the solution we were looking for, as it allows us to
identify if a user reloaded a conversation in the same tab,
or entered it in another tab.

Signed-off-by: Joas Schilling <[email protected]>
404: now redirects to /not-found
*: now retries after 10 seconds and shows an error
   and give up after 5 minutes recommending a reload

Signed-off-by: Joas Schilling <[email protected]>
Otherwise there is no update of the computed and the call screen will not show up.

Signed-off-by: Joas Schilling <[email protected]>
But they were actually removed from the conversation.

Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen nickvergessen force-pushed the bugfix/3415/conflict-on-joining-a-second-time branch from 2a49040 to db24555 Compare July 1, 2020 08:00
@nickvergessen nickvergessen force-pushed the bugfix/3415/conflict-on-joining-a-second-time branch from db24555 to e5c75cb Compare July 1, 2020 10:08
Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

Yay! :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug feature: api 🛠️ OCS API for conversations, chats and participants

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants