-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Description
There's now a good number of use cases for a better version of SyncUntil and friends. As of #267 we now have:
- SyncUntilTimelineHas
- SyncUntilGlobalAccountDataHas
- SyncUntilInvitedTo
which all call SyncUntil with varying parameters. Using functional options here (like client.MustDoFunc) seems like the obvious solution. This also allows both timeline/account data to be checked in a single go, etc. By doing this, we can also adjust the thing we are looping over (obviating the need for things like #245 and #246).
In terms of since token handling (e.g #247), it's a lot clearer in tests if the token is returned to the caller rather than side-effected on the client. Consider:
alice := deployment.Client("alice", "hs1")
postInviteToken := alice.SyncUntil(...get invited)
alice.JoinRoom(...)
postJoinToken := alice.SyncUntil(postInviteToken, ...get join)This gives flexibility to start from an initial sync or do an incremental sync.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels