refactor: funnel event creation through room versions (#3060)

In preparation of interfacing up the room version value.
This commit is contained in:
kegsay 2023-04-20 19:07:31 +01:00 committed by GitHub
parent 72285b2659
commit 71eeccf34a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 41 additions and 35 deletions

View file

@ -36,7 +36,7 @@ func mustCreateDatabase(t *testing.T, dbType test.DBType) (storage.UserDatabase,
func mustCreateEvent(t *testing.T, content string) *gomatrixserverlib.HeaderedEvent {
t.Helper()
ev, err := gomatrixserverlib.NewEventFromTrustedJSON([]byte(content), false, gomatrixserverlib.RoomVersionV10)
ev, err := gomatrixserverlib.RoomVersionV10.NewEventFromTrustedJSON([]byte(content), false)
if err != nil {
t.Fatalf("failed to create event: %v", err)
}