synapse
synapse copied to clipboard
Stop returning `unsigned.invite_room_state` in `PUT /_matrix/federation/v2/invite/{roomId}/{eventId}` responses
We were adding an 'invite_room_state' field in the 'unsigned' dict of invite events in response to a
PUT /_matrix/federation/v2/invite/{roomId}/{eventId}
request.
Internally, Synapse expects this to field to exist (as it did in the v1 version of this API), so we plonked it on before reusing the old code.
Unfortunately, we then forgot to remove it before sending the event out again.
Confirmed the problem and the fix using PyCharm's debugger. I thought about writing a unit/complement test but it's a bit specific...
More information about stripped state events.
I assume this is backwards-compatible, and that nobody is relying on it. It appears in an example in the S2S spec (likely by accident), but not the actual schema.
Related: #10800?
Looks like tests fell foul of #14079. I'll re-run. (Edit: err, merge in develop).
@anoadragon453 looks like this is good to go now. (I assume you still want to land this?)
Yep, thank you!