Update federation invite code too

This commit is contained in:
Kegan Dougal 2020-06-24 14:32:38 +01:00
parent fa239080e6
commit 476d17958e

View file

@ -98,15 +98,15 @@ func Invite(
) )
// Add the invite event to the roomserver. // Add the invite event to the roomserver.
if err = api.SendInvite( if perr := api.SendInvite(
httpReq.Context(), rsAPI, httpReq.Context(), rsAPI,
signedEvent.Headered(inviteReq.RoomVersion()), signedEvent.Headered(inviteReq.RoomVersion()),
inviteReq.InviteRoomState(), inviteReq.InviteRoomState(),
event.Origin(), event.Origin(),
nil, nil,
); err != nil { ); perr != nil {
util.GetLogger(httpReq.Context()).WithError(err).Error("producer.SendInvite failed") util.GetLogger(httpReq.Context()).WithError(err).Error("producer.SendInvite failed")
return jsonerror.InternalServerError() return perr.JSONResponse()
} }
// Return the signed event to the originating server, it should then tell // Return the signed event to the originating server, it should then tell