-
-
Notifications
You must be signed in to change notification settings - Fork 822
Provide a more detailed error message than "No known servers" #6048
Changes from all commits
efd793c
513300a
bcb12af
9b33261
3f4ee2f
72f9d7a
b6aa7e6
bfb5707
170da1b
26f974d
c58fe0b
0c52759
0b3f050
78eb743
c72ac81
2791011
030ced3
6c72541
19ad1a2
ce8c0d9
a99f514
b2b4732
e3982da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -593,7 +593,7 @@ export class RoomViewStore extends EventEmitter { | |
); | ||
} else if (err.httpStatus === 404) { | ||
const invitingUserId = this.getInvitingUserId(roomId); | ||
// only provide a better error message for invites | ||
// provide a better error message for invites | ||
if (invitingUserId) { | ||
// if the inviting user is on the same HS, there can only be one cause: they left. | ||
if (invitingUserId.endsWith(`:${MatrixClientPeg.get().getDomain()}`)) { | ||
|
@@ -602,6 +602,23 @@ export class RoomViewStore extends EventEmitter { | |
description = _t("The person who invited you has already left, or their server is offline."); | ||
} | ||
} | ||
|
||
// provide a more detailed error than "No known servers" when attempting to | ||
// join using a room ID and no via servers | ||
if (roomId === this.state.roomId && this.state.viaServers.length === 0) { | ||
description = ( | ||
<div> | ||
{_t( | ||
"You attempted to join using a room ID without providing a list " + | ||
"of servers to join through. Room IDs are internal identifiers and " + | ||
"cannot be used to join a room without additional information.", | ||
)} | ||
<br /> | ||
<br /> | ||
{_t("If you know a room address, try joining through that instead.")} | ||
</div> | ||
); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related to https://github.com/vector-im/element-web/issues/24475 Maybe some language inspiration in this:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not all rooms have an alias and you can stumble upon a room ID in an unlimited number of ways. The user obviously tried to use a room ID here and we should make it possible for them to continue with what they have. Leaving the user helpless to go ask someone else for a room alias isn't very empowering. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have any data to argue that point, except I think the user probably doesn't have that choice and can at best make a very educated guess. However I do disagree with your previous suggestion:
Honestly, either
The best I can come up with is to "try using the server (latter part of matrix ID) or a user who you know is in the room as a via server)". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
All room IDs include this information at the moment. And is why I created https://github.com/vector-im/element-web/issues/24475 to suggest to people how to do the right thing (derive the via server from the room ID)
Agreed that this should just be automatic, but I think we're at ideological odds with the decision makers since they would want to treat room IDs as opaque strings that shouldn't be parsed. Treating it as an opaque string is generally a good heuristic since there is some future-looking here where room IDs potentially won't include this information (wish I had some links for future desire). The half-measure of suggesting the right thing at least gets them to the right place and teaches for next time. And I think has the potential to actually be merged. |
||
} | ||
|
||
Modal.createDialog(ErrorDialog, { | ||
|
@@ -615,7 +632,9 @@ export class RoomViewStore extends EventEmitter { | |
joining: false, | ||
joinError: payload.err, | ||
}); | ||
this.showJoinRoomError(payload.err, payload.roomId); | ||
if (payload.err) { | ||
this.showJoinRoomError(payload.err, payload.roomId); | ||
} | ||
} | ||
|
||
public reset(): void { | ||
|
Uh oh!
There was an error while loading. Please reload this page.