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

#3149 fix waypoint link reloads room #4272

Merged
merged 2 commits into from
Jun 3, 2021

Conversation

yakyouk
Copy link
Contributor

@yakyouk yakyouk commented May 20, 2021

Fixes links pointing to waypoint hashes reloading the room.
Clicking on a link with a hash does not compare full urls anymore, instead it checks if the link's domain and room ID match those of the current room. As a side effect, waypoint links now also work on a local client.

Fixes back button sending to last waypoint: when using a waypoint link, the url with hash and the url with cleared hash was added to history. Now uses replaceState() instead.

Fixes RegEx for room/avatar/scene links to NOT match when IDs have more than 7 letters/numbers.

@netpro2k netpro2k merged commit 7fa6663 into Hubs-Foundation:master Jun 3, 2021
@netpro2k
Copy link
Contributor

netpro2k commented Jun 3, 2021

I don't love that isHubsRoomUrl now returns a non-boolean value (just because of the name) but this is a really impactful change. Thanks for the PR!

@yakyouk
Copy link
Contributor Author

yakyouk commented Jun 5, 2021

I don't love that isHubsRoomUrl now returns a non-boolean value (just because of the name) but this is a really impactful change. Thanks for the PR!

True, the rest of the code relies on it being truthy/falsy, so to prevent things from breaking if return value changes in the future, it would be cleaner to use a new function idForRoomUrl.

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.

2 participants