Skip to content

Support Matrix server discovery (.well-known) - #27

Merged
wiggin77 merged 5 commits into
masterfrom
support_well-known_discovery
Feb 11, 2026
Merged

Support Matrix server discovery (.well-known)#27
wiggin77 merged 5 commits into
masterfrom
support_well-known_discovery

Conversation

@wiggin77

Copy link
Copy Markdown
Member

Summary

Implements Matrix server discovery (.well-known/matrix/server) to support deployments where the Matrix homeserver URL differs from the Matrix ID domain. Fixes #14.

Organizations commonly use Matrix server discovery to separate their homeserver location from their Matrix ID domain. For example:

This is configured via .well-known/matrix/server: { "m.server": "matrix.example.com:443" }

Previously, the plugin derived the Matrix ID domain directly from the homeserver URL hostname, causing Matrix IDs to be constructed incorrectly as @user:matrix.example.com instead of @user:example.com.

This is implemented with three-tier server name resolution:

  1. Manual Configuration - Use explicitly configured MatrixServerName if provided
  2. Automatic Discovery - Try .well-known/matrix/server discovery on the homeserver URL hostname
  3. Fallback - Extract hostname from the homeserver URL (current behavior)

Ticket Link

fixes #14

@wiggin77
wiggin77 requested a review from Copilot December 20, 2025 04:56

This comment was marked as outdated.

@wiggin77 wiggin77 added the Dev Review Requires review by a developer. label Dec 20, 2025
@wiggin77
wiggin77 requested a review from Copilot December 20, 2025 05:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/matrix/server_discovery.go
Comment thread server/command/command.go
@wiggin77
wiggin77 requested a review from fmartingr December 20, 2025 05:43
Comment thread server/matrix/server_discovery.go Outdated
Comment thread server/matrix/server_discovery.go Outdated
Comment thread server/matrix/server_discovery.go Outdated
Comment thread server/matrix/server_discovery.go Outdated
Comment thread server/configuration.go Outdated
@wiggin77
wiggin77 merged commit ee791bf into master Feb 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dev Review Requires review by a developer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server discovery support

3 participants