aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorkegsay <kegan@matrix.org>2023-04-27 16:35:19 +0100
committerGitHub <noreply@github.com>2023-04-27 16:35:19 +0100
commit617131030707aacd39f0f771626eaa5b8f88299c (patch)
tree41c91962f6235871e5178bae4fd174ef58dffd05 /setup
parentc6457cd4e551017246af7ddcece212edfb927076 (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 'setup')
-rw-r--r--setup/mscs/msc2836/msc2836.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup/mscs/msc2836/msc2836.go b/setup/mscs/msc2836/msc2836.go
index b106a246..38412fa2 100644
--- a/setup/mscs/msc2836/msc2836.go
+++ b/setup/mscs/msc2836/msc2836.go
@@ -646,7 +646,7 @@ func (rc *reqCtx) getLocalEvent(roomID, eventID string) *types.HeaderedEvent {
// into the roomserver as KindOutlier, with auth chains.
func (rc *reqCtx) injectResponseToRoomserver(res *MSC2836EventRelationshipsResponse) {
var stateEvents gomatrixserverlib.EventJSONs
- var messageEvents []*gomatrixserverlib.Event
+ var messageEvents []gomatrixserverlib.PDU
for _, ev := range res.ParsedEvents {
if ev.StateKey() != nil {
stateEvents = append(stateEvents, ev.JSON())
@@ -665,7 +665,7 @@ func (rc *reqCtx) injectResponseToRoomserver(res *MSC2836EventRelationshipsRespo
for _, outlier := range append(eventsInOrder, messageEvents...) {
ires = append(ires, roomserver.InputRoomEvent{
Kind: roomserver.KindOutlier,
- Event: &types.HeaderedEvent{Event: outlier},
+ Event: &types.HeaderedEvent{Event: outlier.(*gomatrixserverlib.Event)},
})
}
// we've got the data by this point so use a background context