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:
kegsay 2022-02-09 20:31:24 +00:00 committed by GitHub
parent cc688a9a38
commit aa5c3b88de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 158 additions and 107 deletions

View file

@ -387,14 +387,7 @@ func (h *httpFederationInternalAPI) LookupMissingEvents(
if request.Err != nil {
return res, request.Err
}
res.Events = make([]*gomatrixserverlib.Event, 0, len(request.Res.Events))
for _, js := range request.Res.Events {
ev, err := gomatrixserverlib.NewEventFromUntrustedJSON(js, roomVersion)
if err != nil {
return res, err
}
res.Events = append(res.Events, ev)
}
res.Events = request.Res.Events
return res, nil
}