Skip to content

Commit

Permalink
spec: Update to Presence#get functionality when in SUSPENDED state
Browse files Browse the repository at this point in the history
If a dev calls #get with waitForSync: true, yet the channel is SUSPENDED, then the presence is out of sync and it should result in a failure. Devs can still access the PresenceMap with waitForSync: false
  • Loading branch information
mattheworiordan committed Jan 4, 2017
1 parent a7e2da3 commit c3b242b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/client-lib-development-guide/features.textile
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ h3(#realtime-presence). Presence
* @(RTP11)@ @Presence#get@ function:
** @(RTP11a)@ Returns the list of current members on the channel in a callback. By default, will wait for the @SYNC@ to be completed, see "RTP11c1":#RTP11c1
** @(RTP11b)@ Implicitly attaches the @Channel@ if the channel is in the @INITIALIZED@ state. However, if the channel is in or enters the @DETACHED@ or @FAILED@ state before the operation succeeds, it will result in an error
** @(RTP11d)@ If the @Channel@ is in the @SUSPENDED@ state then the @get@ function immediately returns the members stored in the @PresenceMap@ and does not wait until the channel state changes to @ATTACHED@ irrespective of whether @waitForSync@ is true or false
** @(RTP11d)@ If the @Channel@ is in the @SUSPENDED@ state then the @get@ function will by default, or if @waitForSync@ is set to @true@, result in an error with @code@ @91005@ and a @message@ stating that the presence state is out of sync due to the channel being in a @SUSPENDED@ state. If however the @get@ function is called with @waitForSync@ set to @false@, then it immediately returns the members currently stored in the @PresenceMap@ giving developers access to the members that were present at the time the channel became @SUSPENDED@
** @(RTP11c)@ An optional set of params can be provided:
*** @(RTP11c1)@ @waitForSync@ (default @true@). When @true@, method will wait until @SYNC@ is complete before returning a list of members. When @false@, known set of presence members is returned immediately, which may be incomplete if the @SYNC@ is not finished
*** @(RTP11c2)@ @clientId@ filters members by the provided @clientId@
Expand Down

0 comments on commit c3b242b

Please sign in to comment.