Skip to content

Commit

Permalink
🏷️ Mark presence.subscribe() options as internal
Browse files Browse the repository at this point in the history
Add a prefix to the `force` option to mark it as internal, so we can
remove it later if needed.
  • Loading branch information
alecgibson committed Oct 10, 2023
1 parent e7e77ba commit cc4cccb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/client/presence/presence.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/client/presence/remote-doc-presence.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit cc4cccb

Please sign in to comment.