aboutsummaryrefslogtreecommitdiff
path: root/roomserver/roomserver_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'roomserver/roomserver_test.go')
-rw-r--r--roomserver/roomserver_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/roomserver/roomserver_test.go b/roomserver/roomserver_test.go
index d1a74d3c..856321bc 100644
--- a/roomserver/roomserver_test.go
+++ b/roomserver/roomserver_test.go
@@ -139,7 +139,7 @@ func testKickUsers(t *testing.T, rsAPI api.RoomserverInternalAPI, usrAPI userAPI
// revoke guest access
revokeEvent := room.CreateAndInsert(t, alice, spec.MRoomGuestAccess, map[string]string{"guest_access": "forbidden"}, test.WithStateKey(""))
- if err := api.SendEvents(ctx, rsAPI, api.KindNew, []*gomatrixserverlib.HeaderedEvent{revokeEvent}, "test", "test", "test", nil, false); err != nil {
+ if err := api.SendEvents(ctx, rsAPI, api.KindNew, []*types.HeaderedEvent{revokeEvent}, "test", "test", "test", nil, false); err != nil {
t.Errorf("failed to send events: %v", err)
}
@@ -404,7 +404,7 @@ type fledglingEvent struct {
PrevEvents []interface{}
}
-func mustCreateEvent(t *testing.T, ev fledglingEvent) (result *gomatrixserverlib.HeaderedEvent) {
+func mustCreateEvent(t *testing.T, ev fledglingEvent) (result *types.HeaderedEvent) {
t.Helper()
roomVer := gomatrixserverlib.RoomVersionV9
seed := make([]byte, ed25519.SeedSize) // zero seed
@@ -426,7 +426,7 @@ func mustCreateEvent(t *testing.T, ev fledglingEvent) (result *gomatrixserverlib
if err != nil {
t.Fatalf("mustCreateEvent: failed to sign event: %s", err)
}
- h := signedEvent.Headered(roomVer)
+ h := &types.HeaderedEvent{Event: signedEvent}
return h
}
@@ -454,7 +454,7 @@ func TestRedaction(t *testing.T) {
Depth: redactedEvent.Depth() + 1,
PrevEvents: []interface{}{redactedEvent.EventID()},
})
- room.InsertEvent(t, builderEv.Headered(gomatrixserverlib.RoomVersionV9))
+ room.InsertEvent(t, builderEv)
},
},
{
@@ -471,7 +471,7 @@ func TestRedaction(t *testing.T) {
Depth: redactedEvent.Depth() + 1,
PrevEvents: []interface{}{redactedEvent.EventID()},
})
- room.InsertEvent(t, builderEv.Headered(gomatrixserverlib.RoomVersionV9))
+ room.InsertEvent(t, builderEv)
},
},
{
@@ -488,7 +488,7 @@ func TestRedaction(t *testing.T) {
Depth: redactedEvent.Depth() + 1,
PrevEvents: []interface{}{redactedEvent.EventID()},
})
- room.InsertEvent(t, builderEv.Headered(gomatrixserverlib.RoomVersionV9))
+ room.InsertEvent(t, builderEv)
},
},
{
@@ -504,7 +504,7 @@ func TestRedaction(t *testing.T) {
Depth: redactedEvent.Depth() + 1,
PrevEvents: []interface{}{redactedEvent.EventID()},
})
- room.InsertEvent(t, builderEv.Headered(gomatrixserverlib.RoomVersionV9))
+ room.InsertEvent(t, builderEv)
},
},
}