syncDiff

fun syncDiff(currentState: PresenceState, diff: PresenceDiff, onJoin: OnJoin = { _, _, _ -> }, onLeave: OnLeave = { _, _, _ -> }): PresenceState

Used to sync a diff of presence join and leave events from the server, as they happen. Like syncState, syncDiff accepts optional onJoin and onLeave callbacks to react to a user joining or leaving from a device.