Name the homeserver's administrator when it cannot be reached - #7553
Open
hayaksi1 wants to merge 2 commits into
Open
Name the homeserver's administrator when it cannot be reached#7553hayaksi1 wants to merge 2 commits into
hayaksi1 wants to merge 2 commits into
Conversation
Contributor
|
Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:
|
"We couldn't reach this homeserver" leaves the user with nobody to ask. The Matrix spec has a place for that answer — /.well-known/matrix/support, served by the delegating domain, so it usually answers even when the homeserver API does not. Read it on the failure path only and add the administrator's email address, Matrix ID or support page to the dialog. A homeserver that advertises nothing, or that cannot be reached at all, keeps today's text. Part of element-hq#4556.
hayaksi1
force-pushed
the
fix/4556-homeserver-support-contact
branch
from
August 25, 2026 15:53
d9d2c98 to
f024293
Compare
bmarty
requested changes
Aug 26, 2026
bmarty
left a comment
Member
There was a problem hiding this comment.
Thanks for the enhancement.
Since the Matrix specs is defining where the administrator can be reached, the change has to be located in the SDK first. Probably ClientBuildException.ServerUnreachable should carry the admin email if available.
2 tasks
hayaksi1
added a commit
to hayaksi1/matrix-rust-sdk
that referenced
this pull request
Aug 26, 2026
"We couldn't reach this homeserver" tells the user to contact an administrator without saying who that is. The spec has a place for that answer: GET /.well-known/matrix/support. It is served by the delegating domain rather than by the homeserver API, so it usually answers even when the API does not, which is exactly the case where a client needs it. discover_server_support reads that file for a server name or homeserver URL, without needing a Client, so it can be called after a client build has already failed. The FFI wraps it and returns None when the server advertises nothing or cannot be reached at all, since either way there is nobody to name. Sits behind element-hq/element-x-android#7553.
Contributor
Author
|
Moved the lookup into the SDK as suggested: matrix-org/matrix-rust-sdk#6924. I'll rework this PR on top of it once that lands. |
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.
Content
"We couldn't reach this homeserver" tells the user to contact an administrator without saying who
that is. The Matrix spec has a place for that answer:
GET /.well-known/matrix/support,served by the delegating domain rather than the homeserver API, so it usually answers even when the
API does not — which is exactly the case in the report.
On the failure path only, the login flow now reads that file and adds the administrator's email
address, Matrix ID or support page to the dialog. An admin contact is preferred over the other roles,
an email address over a Matrix ID, and the support page is the last resort. A homeserver that
advertises nothing, or that cannot be reached at all, keeps today's text — the lookup never fails the
login, and it never runs on the success path.
Deliberately out of scope: raising the log level during authentication and offering the logs from the
dialog, the other half of manuroe's comment.
Motivation and context
Part of #4556. manuroe, reopening it as an enhancement: "And to really finish the work, we need to
add the admin details in this error popup as adverstised by
GET /.well-known/matrix/support."Tests
HomeserverSupportContactProviderTest— role preference, email over Matrix ID, support page as thelast resort, and nothing advertised.
OnBoardingPresenterTest— an unreachable homeserver producesChangeServerError.InvalidServer(supportContact = …)when one is advertised andChangeServerError.InvalidServer()when not.present - an unreachable homeserver reports the administrator it advertisesfail../gradlew :features:login:impl:testDebugUnitTest :features:login:impl:ktlintCheck :features:login:impl:detekt— green.ChangeServerErrorPreviewParamvalue, appended last so theexisting goldens keep their indices; the two new ones were recorded by CI.
Tested devices
Checklist