Skip to content

Conversation

@danxuliu
Copy link
Member

This fixes a regression introduced in eba73a3

When a reconnection is forced and the standalone signaling server is used the participant joins again the conversation to get a new session, and then the websocket to the standalone signaling server is closed, which causes the reconnection with the signaling server. However, when the participant is a guest and joins again the previous session gets a disinvite message, which causes the browser to be redirected to the main Talk page.

Due to this, now the disinvite message will be ignored when a forced reconnection is started until the socket has reconnected. It seems that the disinvite message will always be delivered before the request to rejoin a conversation returns, so the flag could be disabled as soon as the request returned instead of when the socket is connected. However, disabling it once the socket has connected again is also logical and seems more future proof.

In any case, as the disinvite message is ignored that means that if a participant is actually kicked out from the conversation while performing a forced reconnection the browser will not be aware of it and a wrong UI would be shown. However, the chance of that happening is quite low.

For a proper handling it would be probably better to fix this by taking into account the reason field in the disinvite message. However, if I am not mistaken the latest HPB version does not include yet that change, so it would work only for people running the master version of the signaling server.

Also I have not checked either if it can be fixed somehow at the server level to prevent the disinvite message from being sent in this case instead of ignoring it at the client level.

How to test

OCA.Talk.forceReconnect = function() {
    forceReconnect(signaling)
}
  • Create a public conversation and start a call
  • In a private window, open the conversation as a guest
  • Join the call
  • In the browser console of the private window, run OCA.Talk.forceReconnect()

Result with this pull request

The guest reconnects.

Result without this pull request

The guest is redirected to the login page.

When a reconnection is forced and the standalone signaling server is
used the participant joins again the conversation to get a new session,
and then the websocket to the standalone signaling server is closed,
which causes the reconnection with the signaling server. However, when
the participant is a guest and joins again the previous session gets a
"disinvite" message, which causes the browser to be redirected to the
main Talk page.

Due to this, now the "disinvite" message will be ignored when a forced
reconnection is started until the socket has reconnected. It seems that
the "disinvite" message will always be delivered before the request to
rejoin a conversation returns, so the flag could be disabled as soon as
the request returned instead of when the socket is connected. However,
disabling it once the socket has connected again is also logical and
seems more future proof.

In any case, as the "disinvite" message is ignored that means that if a
participant is actually kicked out from the conversation while
performing a forced reconnection the browser will not be aware of it and
a wrong UI would be shown. However, the chance of that happening is
quite low.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@danxuliu danxuliu added 3. to review bug feature: signaling 📶 Internal and external signaling backends feature: frontend 🖌️ "Web UI" client labels Aug 20, 2020
@danxuliu danxuliu added this to the 💚 Next Major (20) milestone Aug 20, 2020
@danxuliu danxuliu requested a review from nickvergessen August 20, 2020 12:40
@danxuliu
Copy link
Member Author

/backport to stable19

@nickvergessen nickvergessen merged commit b6732f5 into master Aug 20, 2020
@nickvergessen nickvergessen deleted the fix-forced-reconnections-for-guests-when-the-hpb-is-used branch August 20, 2020 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug feature: frontend 🖌️ "Web UI" client feature: signaling 📶 Internal and external signaling backends

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants