Commit 00829dae authored by marius david's avatar marius david
Browse files

Add support for Matrix link

parent 4d3f17a7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@
	"links": {
		"lemmy": [
			"!test@lemmy.mariusdavid.fr"
		],
		"matrix": [
			"#canvas-general:aftermath.gg"
		]
	},
	"path": {
+13 −0
Original line number Diff line number Diff line
@@ -384,6 +384,19 @@ const externalLinksConfig = [
			inputField.title = "Lemmy link using the !community@example.com format, a Lemmy domain using the @example.com format or a post with it’s url"
		},
	},
	{
		name: "Matrix",
		id: "matrix",
		generateLink: (link) => "https://matrix.to/#/" + link,
		listingClass: "bi-chat-dots",
		generateListingName: (link) => link,
		placeholder: "#example:example.com",
		configureInputField: (inputField) => {
			inputField.placeholder = "#example:example.com"
			inputField.title = "Link to a Matrix room or space, in the form of #example:example.com"
			inputField.pattern = "#.*:.*"
		}
	},
	{
		name: "Website",
		id: "website",