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 /roomserver/api | |
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 'roomserver/api')
-rw-r--r-- | roomserver/api/wrapper.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/roomserver/api/wrapper.go b/roomserver/api/wrapper.go index 73feb2d3..d4606622 100644 --- a/roomserver/api/wrapper.go +++ b/roomserver/api/wrapper.go @@ -55,7 +55,8 @@ func SendEventWithState( state gomatrixserverlib.StateResponse, event *types.HeaderedEvent, origin spec.ServerName, haveEventIDs map[string]bool, async bool, ) error { - outliers := gomatrixserverlib.LineariseStateResponse(event.Version(), state) + outliersPDU := gomatrixserverlib.LineariseStateResponse(event.Version(), state) + outliers := gomatrixserverlib.TempCastToEvents(outliersPDU) ires := make([]InputRoomEvent, 0, len(outliers)) for _, outlier := range outliers { if haveEventIDs[outlier.EventID()] { |