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

Add basic support for parsing matrix-URIs (MSC2312) #234

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Unkn0wnCat
Copy link

@Unkn0wnCat Unkn0wnCat commented Sep 27, 2021

Hello all,

This pull request implements basic support for processing matrix-URIs as defined in matrix-org/matrix-spec-proposals#2312.

Included in this pull request:

Note that the "matrix:"-prefix is optional. Links like https://deploy-preview-234--matrix-to.netlify.app/#/u/kevin:1in1.net also work!

See also: #205, This PR would work great in conjunction with #223

Hope this helps, let me know if you'd like something changed or if there is something I've overlooked!

-- Kevin

@Unkn0wnCat
Copy link
Author

Update: I've changed the links in my description to include the preview link provided by Netlify CI.

You can directly test my fork at https://deploy-preview-234--matrix-to.netlify.app/

@Unkn0wnCat Unkn0wnCat changed the title Add basic support for matrix-URIs (MSC2312) Add basic support for parsing matrix-URIs (MSC2312) Sep 27, 2021
@Unkn0wnCat
Copy link
Author

Example code for registering matrix.to as a matrix:-protocol-handler with this PR:

navigator.registerProtocolHandler("matrix",
                                  "https://deploy-preview-234--matrix-to.netlify.app/#/%s",
                                  "Matrix");

You can try it out by copying it into your browser console (Tested on Firefox 92.0.1)

@Unkn0wnCat Unkn0wnCat marked this pull request as draft September 28, 2021 11:08
@Unkn0wnCat
Copy link
Author

After talking to @DanilaFe, I'll now be working on implementing https://github.com/matrix-org/matrix-uri-parser-js into Matrix.to instead of doing something completely new.

@3nt3 3nt3 mentioned this pull request Oct 12, 2022
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.

1 participant