synapse icon indicating copy to clipboard operation
synapse copied to clipboard

Stop returning `unsigned.invite_room_state` in `PUT /_matrix/federation/v2/invite/{roomId}/{eventId}` responses

Open anoadragon453 opened this issue 1 year ago • 1 comments

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.

anoadragon453 avatar Oct 05 '22 14:10 anoadragon453

Related: #10800?

DMRobertson avatar Oct 05 '22 17:10 DMRobertson

Looks like tests fell foul of #14079. I'll re-run. (Edit: err, merge in develop).

DMRobertson avatar Oct 19 '22 19:10 DMRobertson

@anoadragon453 looks like this is good to go now. (I assume you still want to land this?)

DMRobertson avatar Oct 20 '22 10:10 DMRobertson

Yep, thank you!

anoadragon453 avatar Oct 20 '22 14:10 anoadragon453