mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +00:00
Unmarshal events at the Dendrite level not GMSL level (#2164)
* Use new event json types in gmsl * Fix EventJSON to actually unmarshal events * Update GMSL * Bump GMSL and improve error messages * Send back the correct RespState * Update GMSL
This commit is contained in:
parent
cc688a9a38
commit
aa5c3b88de
15 changed files with 158 additions and 107 deletions
|
@ -170,13 +170,18 @@ func ExchangeThirdPartyInvite(
|
|||
util.GetLogger(httpReq.Context()).WithError(err).Error("federation.SendInvite failed")
|
||||
return jsonerror.InternalServerError()
|
||||
}
|
||||
inviteEvent, err := signedEvent.Event.UntrustedEvent(verRes.RoomVersion)
|
||||
if err != nil {
|
||||
util.GetLogger(httpReq.Context()).WithError(err).Error("federation.SendInvite failed")
|
||||
return jsonerror.InternalServerError()
|
||||
}
|
||||
|
||||
// Send the event to the roomserver
|
||||
if err = api.SendEvents(
|
||||
httpReq.Context(), rsAPI,
|
||||
api.KindNew,
|
||||
[]*gomatrixserverlib.HeaderedEvent{
|
||||
signedEvent.Event.Headered(verRes.RoomVersion),
|
||||
inviteEvent.Headered(verRes.RoomVersion),
|
||||
},
|
||||
request.Origin(),
|
||||
cfg.Matrix.ServerName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue