matrix-org / matrix.to

A simple stateless privacy-protecting URL redirecting service for Matrix
http://matrix.to
Apache License 2.0
893 stars 189 forks source link

Privacy policy does not appear after first load, and does not disappar on URL change. #224

Closed DanilaFe closed 2 years ago

DanilaFe commented 2 years ago

Describe the bug When matrix.to is open, putting #/policy/ in the URL is a no-op. However, when the page is refreshed, the policy does again appear. When doing so, however, even if you change the URL to something else, the policy information remains and looks quite broken.

To Reproduce Steps to reproduce the behavior:

  1. Go to any Matrix.to link (say, /#/@daniel:matrix.danilafe.com)
  2. Change URL to /#/policy/.
  3. Nothing happens (issue 1)
  4. Refresh page. Policy information appears
  5. Navigate back to /#/@daniel:matrix.danilafe.com
  6. Policy information remains (issue 2, see attached screenshot)

Expected behavior Display policy whenever in /policy, and not at other times.

Screenshots Screenshot 2021-08-25 at 14-07-27 You're invited to talk on Matrix

Desktop (please complete the following information):

Issue 2 stems from the fact that changing the URL to non-policy does not reset the existing policy view.

If this is indeed correct, I can submit a PR with a fix.