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 issues with single-room mode and guest login #222

Merged
merged 22 commits into from
Jun 6, 2023
Merged

Conversation

psrpinto
Copy link
Member

@psrpinto psrpinto commented Jun 1, 2023

Fixes #211

This PR fixes several issues with single-room mode and guest login.

Previously we were disabling hydrogen's feature of restoring the last URL, but this breaks hydrogen in subtle ways. So we're no longer doing that globally, instead we only do it for the cases where it makes sense (login and "empty" session picker).

Additionally, we were re-implementing functionality that is already in hydrogen, related to showing the unknown room and checking if it's world-readable. In chatrix we don't need to do this, we just need to login as guest when appropriate, and send the user to the room.

The code that manages which screen is shown under which conditions is hard to understand IMHO (hydrogen is missing a proper "router"), so I refactored it a bit and added a bunch of comments.

I tested this in all the ways I could think of and did not find any issues. However, there are unrelated issues that can look like it's an issue with this PR (#224 and #225) so take that in mind if you do testing on your side.

TODO

  • When there's a single session in the session picker, and we're in single-room mode, it doesn't go directly into that session, and instead shows the session picker

@psrpinto psrpinto marked this pull request as ready for review June 5, 2023 16:49
@psrpinto psrpinto requested a review from ashfame June 5, 2023 16:49
@psrpinto
Copy link
Member Author

psrpinto commented Jun 6, 2023

Partially reviewed with @ashfame on a call, merging so we can ship the fixes for guest login.

@psrpinto psrpinto merged commit e0ea956 into main Jun 6, 2023
@psrpinto psrpinto deleted the single-room-fixes branch June 6, 2023 14:23
@psrpinto psrpinto mentioned this pull request Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle failure in guest registration
1 participant