-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/createRoom returns spurious alias
property
#6879
Comments
I don't think it's correct to say that returning additional properties makes for a non-compliant implementation. As a client, you are free to ignore it (indeed you should, since other server implementations will not return it). |
What good is it to return unspecced additional properties (sounds a bit polemic, but I'm genuinely wondering whether I might not be seeing something here)? Best case they are ignored, worst case clients start to depend on them and make the ecosystem divert from spec and stuff starts to break when people use other servers. Aside of that, depending on the way clients verify/parse json, adding additional properties breaks stuff. Room creation in matrix-nio was broken because of this. Does the spec say that additional properties may be returned? |
@jcgruenhage It may be that you can specify a |
@Half-Shot Then it might make sense to add to the spec that this should be returned when an alias is passed for room creation. Clients shouldn't use information returned by a server that is unspecced (for reasons brought forward earlier), so returning it has no use for them unless this became specced (it could be argued that this is just a spec omission after all) |
if it doesn't, it should. This is one of the key reasons for using json rather than a rigid binary format: it gives the ability to introduce new fields without breaking existing clients. Any client which breaks when additional properties are returned should be considered buggy. I'm not saying that synapse should return this property. I am saying that returning it doesn't make it non-compliant. IIRC on this particular property we went round the loop a while ago and decided it was redundant and should not be added to the spec. |
alias
property
makes sense, yeah
@poljar I think that means all
It's at least an unspecced deviation, but I sort of agree now. I still think that returning unspecced properties is harmful. Having additional properties be a non-breaking change is something else than returning additional stuff that is neither specced nor to-be-specced. Can we get this removed from synapse? |
Sure. |
The name of the property seems to be synapse/synapse/handlers/room.py Lines 1007 to 1008 in 357561c
The v1.3 spec still only mandates a
The best reference for this I could find was #10321 which was apparently moved from the spec repo. I suggest we close this issue in favour of that one. |
Duplicate of #10321. |
Description
According to the spec,
_matrix/client/r0/createRoom
returns only theroom_id
. When setting an alias while creating the room, synapse also returns that, which is not spec compliant. Relevant spec bit: https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-createroomSteps to reproduce
Version information
If not matrix.org:
Version: Synapse version 1.7.3, but that bit hasn't changed since then (am updating to 1.9.1 atm)
Install method: docker container
The text was updated successfully, but these errors were encountered: