Response from /send_join now use gomatrixserverlib.RespSendJoin (#796)

* response from /send_join now use gomatrixserverlib.RespSendJoin

* Update Dendrite gomatrixserverlib version

* Fix spelling

Co-authored-by: Andrew Morgan <andrew@amorgan.xyz>
Co-authored-by: Cnly <minecnly@gmail.com>
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
Behouba Manassé 2020-04-22 16:13:11 +03:00 committed by GitHub
parent a466e9e9cc
commit 423c656146
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -386,7 +386,7 @@ func (r joinRoomReq) joinRoomUsingServer(roomID string, server gomatrixserverlib
if err = r.producer.SendEventWithState( if err = r.producer.SendEventWithState(
r.req.Context(), r.req.Context(),
gomatrixserverlib.RespState(respSendJoin.RespState), respSendJoin.ToRespState(),
event.Headered(respMakeJoin.RoomVersion), event.Headered(respMakeJoin.RoomVersion),
); err != nil { ); err != nil {
util.GetLogger(r.req.Context()).WithError(err).Error("r.producer.SendEventWithState") util.GetLogger(r.req.Context()).WithError(err).Error("r.producer.SendEventWithState")

View file

@ -252,9 +252,12 @@ func SendJoin(
return util.JSONResponse{ return util.JSONResponse{
Code: http.StatusOK, Code: http.StatusOK,
JSON: map[string]interface{}{ JSON: gomatrixserverlib.RespSendJoin{
"state": gomatrixserverlib.UnwrapEventHeaders(stateAndAuthChainResponse.StateEvents), RespState: gomatrixserverlib.RespState{
"auth_chain": gomatrixserverlib.UnwrapEventHeaders(stateAndAuthChainResponse.AuthChainEvents), StateEvents: gomatrixserverlib.UnwrapEventHeaders(stateAndAuthChainResponse.StateEvents),
AuthEvents: gomatrixserverlib.UnwrapEventHeaders(stateAndAuthChainResponse.AuthChainEvents),
},
Origin: cfg.Matrix.ServerName,
}, },
} }
} }