MCPcopy
hub / github.com/tldraw/tldraw / pushPresence

Method pushPresence

packages/sync-core/src/lib/TLSyncClient.ts:835–846  ·  view source on GitHub ↗
(nextPresence: R | null)

Source from the content-addressed store, hash-verified

833 private lastPushedPresenceState: R | null = null
834
835 private pushPresence(nextPresence: R | null) {
836 // make sure we push any document changes first
837 this.store._flushHistory()
838
839 if (!this.isConnectedToRoom) {
840 // if we're offline, don't do anything
841 return
842 }
843
844 this.unsentChanges.nextPresence = nextPresence
845 this.sendUnsentChanges()
846 }
847
848 /** Push a change to the server, or stash it locally if we're offline */
849 private push(change: RecordsDiff<any>) {

Callers 2

constructorMethod · 0.95
didReconnectMethod · 0.95

Calls 1

_flushHistoryMethod · 0.80

Tested by

no test coverage detected