diff options
author | kegsay <kegan@matrix.org> | 2023-04-27 16:35:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 16:35:19 +0100 |
commit | 617131030707aacd39f0f771626eaa5b8f88299c (patch) | |
tree | 41c91962f6235871e5178bae4fd174ef58dffd05 /clientapi | |
parent | c6457cd4e551017246af7ddcece212edfb927076 (diff) |
Use PDU interface (#3070)
We only use it in a few places currently, enough to get things to
compile and run. We should be using it in much more places.
Similarly, in some places we cast []PDU back to []*Event, we need to not
do that. Likewise, in some places we cast PDU to *Event, we need to not
do that. For now though, hopefully this is a start.
Diffstat (limited to 'clientapi')
-rw-r--r-- | clientapi/routing/sendevent.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clientapi/routing/sendevent.go b/clientapi/routing/sendevent.go index 71dc6c40..0d01367d 100644 --- a/clientapi/routing/sendevent.go +++ b/clientapi/routing/sendevent.go @@ -317,7 +317,7 @@ func generateSendEvent( for i := range queryRes.StateEvents { stateEvents[i] = queryRes.StateEvents[i].Event } - provider := gomatrixserverlib.NewAuthEvents(stateEvents) + provider := gomatrixserverlib.NewAuthEvents(gomatrixserverlib.ToPDUs(stateEvents)) if err = gomatrixserverlib.Allowed(e.Event, &provider); err != nil { return nil, &util.JSONResponse{ Code: http.StatusForbidden, |