syncState

fun syncState(currentState: PresenceState, newState: PresenceState, onJoin: OnJoin = { _, _, _ -> }, onLeave: OnLeave = { _, _, _ -> }): PresenceState

Used to sync the list of presences on the server with the client's state. An optional onJoin and onLeave callback can be provided to react to changes in the client's local presences across disconnects and reconnects with the server.