Skip to content

Conversation

@danxuliu
Copy link
Member

@danxuliu danxuliu commented Oct 9, 2020

Fixes #4273

Errors other than 404 no longer cause a redirection to spreed/not-found. An error notification is shown, though, similar to what happens if fetching the participant list fails.

How to test

		if (rand(0, 10) < 7) {
			return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
		}
  • Join a call conversation
  • In a private window, join and leave that conversation (so the participant list change triggers a conversation update)

Result with this pull request

An error occurred while updating the conversation notification is shown, but the chat is still open.

Result without this pull request

The chat is replaced by The conversation does not exist. The title page still shows the conversation name.

In the browser console sometimes NavigationDuplicated: Avoided redundant navigation to current location: "/apps/spreed/not-found" appears (it seems to be caused by two participantListChanged events emitted quickly in a row, so the second one triggers another fetch of the conversation before the first one returned, and if both fail the second one causes a redundant redirection).

@danxuliu danxuliu added this to the 💚 Next Major (21) milestone Oct 9, 2020
defaultPageTitle: false,
loading: false,
isRefreshingCurrentConversation: false,
errorUpdatingConversationToast: null,
Copy link
Member

@PVince81 PVince81 Oct 13, 2020

Choose a reason for hiding this comment

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

optional: s/Toast/Message to not make this name implementation dependent ?

this.$store.dispatch('updateToken', to.params.token)
} else if (to.name === 'notfound') {
this.setPageTitle('')
this.$store.dispatch('updateToken', '')
Copy link
Member

Choose a reason for hiding this comment

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

as someone not knowing what effect this code will have, would be nice to add a comment :-)

Copy link
Member

Choose a reason for hiding this comment

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

updating the token should automatically change the pagetitle?

Copy link
Member

Choose a reason for hiding this comment

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

Somehow I think we should still keep the current URL, page title and token in place and only render a "not found" content. The switching will be done anyway by the user.

Copy link
Member

Choose a reason for hiding this comment

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

Doesn't work reliably with guests. They would re initialise the conversation immediately and continue chatting without being annoyed for a second, until we can really block people.

@nickvergessen
Copy link
Member

Master is 22 now

@nickvergessen
Copy link
Member

I will close the PR for now (as there was no active development since 6 months). Anyone can pick it up whenever they want and reopen the PR.

@nickvergessen nickvergessen deleted the fix-leaving-conversation-when-fetching-the-conversation-fails branch October 7, 2021 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep chat open in case of errors (like 404)

4 participants