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

matrix.to forgot that I had an Element Desktop? #367

Closed
richvdh opened this issue Jan 9, 2025 · 5 comments
Closed

matrix.to forgot that I had an Element Desktop? #367

richvdh opened this issue Jan 9, 2025 · 5 comments

Comments

@richvdh
Copy link
Member

richvdh commented Jan 9, 2025

For some reason, links suddenly started opening in element web. (matrix.to was linking to https://app.element.io/).

I have now gone "Continue with Element [Change]" -> "Element" (ie, what looks like a no-op), and now it's correctly linking to element://.

So it's now working again, but I am confused about what broke it.

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Jan 9, 2025

Just played around with it and here is how it's working:

  • The default after choosing Element from the list of clients is the nativePlatform which is Element desktop and the local storage key preferred_client looks like {"id":"element.io","platform":"Linux"} or {"id":"element.io","platform":"macOS"}, etc depending on your platform
  • If you click Continue in your browser, it chooses the webPlatform which is Element Web and the preferred_client local storage key looks like {"id":"element.io","platform":"DesktopWeb"}

From the code, it seems like the only way it chooses web first is if you have previously set your preferred_client to DesktopWeb or MobileWeb. Doing the Continue with Element [Change] -> Element flow actually sets your preference back to Linux/macOS/Windows (it's not a no-op behind the scenes) and seems like the only way in the UI to reset your preference back to desktop after choosing the browser.

I didn't spot how this could spontaneously change without selecting Continue in your browser. There is a bit of smoke where it matches platforms against supported platforms but I didn't investigate deep into that.

@t3chguy
Copy link
Member

t3chguy commented Jan 9, 2025

and seems like the only way in the UI to reset your preference back to desktop after choosing the browser.

image

this would also do it I believe

@richvdh
Copy link
Member Author

richvdh commented Jan 9, 2025

  • If you click Continue in your browser, it chooses the webPlatform which is Element Web and the preferred_client local storage key looks like {"id":"element.io","platform":"DesktopWeb"}

Oh, if "Continue in your browser" permanently changes your preference to "webPlatform", that would explain it -- I can well believe that I hit that button at some point during testing. It's not at all obvious that will be a permanent change rather than a one-off.

@richvdh
Copy link
Member Author

richvdh commented Jan 9, 2025

I'll open a new issue

@richvdh
Copy link
Member Author

richvdh commented Jan 9, 2025

#368. Thanks for the help, both.

@richvdh richvdh closed this as completed Jan 9, 2025
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

No branches or pull requests

3 participants