Fix response to /invite to match the format expected by synapse

This commit is contained in:
Mark Haines 2017-09-11 17:05:31 +01:00
parent 5740cb3e58
commit 25eab325ac

View file

@ -101,6 +101,11 @@ func Invite(
// the other servers in the room that we have been invited. // the other servers in the room that we have been invited.
return util.JSONResponse{ return util.JSONResponse{
Code: 200, Code: 200,
JSON: &signedEvent, // The response to /invite is the signed event but this is returned as
// the second element of a two element list where the first element is
// the constant integer 200.
// (This protocol oddity is the result of a typo in the synapse matrix
// server, and is preserved to maintain compatibility.)
JSON: []interface{}{200, &signedEvent},
} }
} }