-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Unable to join Rooms in a different HS by roomId #2171
Comments
So there was an ongoing discussion on matrix.dev about this - and I'm not sure if everything is clarified or not (I think I was missing a fair bit of context).
The spec explicitly states valid arguments are Why is it failing for a remote server? Well apparently Synapse looks for an un-spec'd argument if RoomID.is_valid(room_identifier):
room_id = room_identifier
try:
remote_room_hosts = request.args["server_name"]
except:
remote_room_hosts = None For example: curl 'https://matrix.amaznev.net:8448/_matrix/client/r0/join/!XqBunHwQIXUiqCaoxq%3Amatrix.org?access_token=<access_token>' -H 'Pragma: no-cache' -H 'content-type: application/json' -H 'accept: application/json' -H 'Connection: keep-alive' --data-binary '{}' --compressed
{
"errcode": "M_UNKNOWN",
"error": "No known servers"
} # Note the `server_name=matrix.org` argument in the second Curl which works.
curl 'https://matrix.amaznev.net:8448/_matrix/client/r0/join/!XqBunHwQIXUiqCaoxq%3Amatrix.org?access_token=<access_token>&server_name=matrix.org' -H 'Pragma: no-cache' -H 'content-type: application/json' -H 'accept: application/json' -H 'Connection: keep-alive' --data-binary '{}' --compressed
{
"room_id": "!XqBunHwQIXUiqCaoxq:matrix.org"
} I guess the next step is to figure out which is correct here, the spec or the |
Room IDs are opaque - the domain part is there only for namespacing, and it is never correct to try to extract it and use it as a server to talk to. I think passing the |
Closing this for now; I think the problem is in the spec, not synapse. |
Can you explain where this logic comes from (as far as the domain part), when exactly would a |
it means it still works if their server is no longer participating in the room they started. I'm not claiming this area is perfect, but we have been very careful to keep room IDs as opaque blobs and I don't think we should change it to fix this. In any case, here doesn't seem to be the right place for this discussion. You may wish to weigh in on element-hq/element-web#2925, or if you still feel strongly that room-IDs should not be opaque, open an issue at matrix-doc |
I wasn't saying that |
Effectively
isRoomPublished
should just toggle whether the room is available in the directory listing of the other server (or contiguous and significant behavior should be spec'd / documented).On the other-hand at the moment attempting to join a room on a different HS by
<room_id>
fails:The text was updated successfully, but these errors were encountered: