Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix endless loading timeline if opened at non-existing event #5659

Merged
merged 2 commits into from
Apr 6, 2022

Conversation

SpiritCroc
Copy link
Contributor

@SpiritCroc SpiritCroc commented Mar 29, 2022

Signed-off-by: Tobias Büttner dev@spiritcroc.de

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Pass M_NOT_FOUND and M_FORBIDDEN server errors to timeline listeners.

Motivation and context

When opening a permalink for a non-existing event (e.g. the event has been deleted on the server), or a forbidden event (e.g. after a moderator redacted the event), we want to tell the user the event wasn't found, and instead reload the timeline without initial eventId. Before, it was just loading endlessly without any indication of a reason.

Tests

Create a permalink for a room with changing the eventId to something like "$doesntexist", and click it.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@SpiritCroc SpiritCroc changed the title Load timeline without initial eventId if not found Fix endless loading timeline if opened at non-existing event Mar 29, 2022
@ouchadam ouchadam added the Z-Community-PR Issue is solved by a community member's PR label Mar 29, 2022
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. This LGTM!

Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Nice catch, thanks, forgot to rebranch this during the rework...

@ganfra ganfra merged commit 94099f4 into element-hq:develop Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants