Skip to content

Commit

Permalink
Attempt to properly fix room create with version
Browse files Browse the repository at this point in the history
  • Loading branch information
hifi committed Feb 26, 2024
1 parent ada407d commit 5446c21
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/csapi/apidoc_room_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func TestRoomCreate(t *testing.T) {
alice.MustSyncUntil(t, client.SyncReq{}, client.SyncJoinedTo(alice.UserID, roomID))

// Get ordered timeline via a full sync
res, _ := alice.MustSync(t, client.SyncReq{Filter: `{"room":{"timeline":{"limit":20}}}`})
res, _ := alice.MustSync(t, client.SyncReq{})

roomObj := res.Get("rooms.join." + client.GjsonEscape(roomID))

Expand All @@ -190,7 +190,10 @@ func TestRoomCreate(t *testing.T) {
event0 := roomObj.Get("timeline.events.0")

if !event0.Exists() {
t.Fatalf("First timeline event does not exist")
event0 = roomObj.Get(`state.events.#(type=="m.room.create")`)
}
if !event0.Exists() {
t.Fatalf("Room create event does not exist")
}

if event0.Get("type").Str != "m.room.create" {
Expand Down

0 comments on commit 5446c21

Please sign in to comment.