fix: support custom matrix.to base URL via config#314
Merged
Just-Insane merged 7 commits intodevfrom Mar 17, 2026
Merged
Conversation
…ors (#67) - matrix-to.ts: replace static hardcoded regexes with a lazily-built cached set that matches both https://matrix.to (cross-client compat) and the configured custom base URL (if matrixToBaseUrl is set in config.json) - editor/output.ts: Mention block now calls getMatrixToRoom / getMatrixToRoomEvent instead of hardcoding the matrix.to base - room.ts: parseReplyFormattedBody uses getMatrixToRoomEvent / getMatrixToRoom for the same reason
Outgoing links embedded in Matrix events (mention HTML, reply quotes) must use https://matrix.to so other clients (Element, FluffyChat, etc.) can parse them as Matrix permalinks. Custom base applies only to UI navigation links (copy-to-clipboard buttons).
Contributor
Deploying with
|
| Status | Preview URL | Commit | Alias | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! | https://pr-314-sable.raspy-dream-bb1d.workers.dev | f65f126 | pr-314 |
Tue, 17 Mar 2026 02:21:11 GMT |
7w1
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
matrixToBaseUrltoconfig.jsonsupport so deployments can override the defaulthttps://matrix.tobase for generated links.What changed:
matrix-to.ts—setMatrixToBase()sets the base; parse regexes are now built lazily and match bothmatrix.toand the custom base (for cross-client incoming link compat)editor/output.ts— mention links usegetMatrixToRoom/getMatrixToRoomEventinstead of hardcoding the baseroom.ts—parseReplyFormattedBodydoes the sameCloses #67