Skip to content

Commit 000f59d

Browse files
authored
Use SyncLeftFrom to check charlie leave event synced to hs1 (#808)
1 parent 0de5285 commit 000f59d

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

tests/restricted_rooms_test.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -326,17 +326,7 @@ func doTestRestrictedRoomsRemoteJoinLocalUser(t *testing.T, roomVersion string,
326326
charlie.MustLeaveRoom(t, room)
327327

328328
// Ensure the events have synced to hs1.
329-
alice.MustSyncUntil(t, client.SyncReq{}, client.SyncTimelineHas(
330-
room,
331-
func(ev gjson.Result) bool {
332-
if ev.Get("type").Str != "m.room.member" || ev.Get("state_key").Str != charlie.UserID {
333-
return false
334-
}
335-
must.Equal(t, ev.Get("content").Get("membership").Str, "leave", "Charlie failed to leave the room")
336-
337-
return true
338-
},
339-
))
329+
alice.MustSyncUntil(t, client.SyncReq{}, client.SyncLeftFrom(charlie.UserID, room))
340330

341331
// Have bob leave and rejoin. This should still work even though hs2 isn't in
342332
// the room anymore!

0 commit comments

Comments
 (0)