From cc4cccb2e0c8f7e213362429a1ef725183e0c6d8 Mon Sep 17 00:00:00 2001 From: Alec Gibson <12036746+alecgibson@users.noreply.github.com> Date: Tue, 10 Oct 2023 18:03:36 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20Mark=20`presence.subscr?= =?UTF-8?q?ibe()`=20options=20as=20internal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a prefix to the `force` option to mark it as internal, so we can remove it later if needed. --- lib/client/presence/presence.js | 2 +- lib/client/presence/remote-doc-presence.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client/presence/presence.js b/lib/client/presence/presence.js index 3a5bf4330..3f0bd92dc 100644 --- a/lib/client/presence/presence.js +++ b/lib/client/presence/presence.js @@ -90,7 +90,7 @@ Presence.prototype._sendSubscriptionAction = function(wantSubscribe, options, ca } options = options || {}; wantSubscribe = !!wantSubscribe; - if (!options.force && wantSubscribe === this.wantSubscribe) { + if (!options._force && wantSubscribe === this.wantSubscribe) { if (!callback) return; if (wantSubscribe === this.subscribed) return util.nextTick(callback); if (Object.keys(this._subscriptionCallbacksBySeq).length) { diff --git a/lib/client/presence/remote-doc-presence.js b/lib/client/presence/remote-doc-presence.js index e52e442c8..ae08062a4 100644 --- a/lib/client/presence/remote-doc-presence.js +++ b/lib/client/presence/remote-doc-presence.js @@ -107,7 +107,7 @@ RemoteDocPresence.prototype._catchUpStalePresence = function() { this._doc.fetch(); // We're already subscribed, but we send another subscribe message // to force presence updates from other clients - this.presence.subscribe({force: true}); + this.presence.subscribe({_force: true}); return false; }