Skip to content

Commit

Permalink
Merge pull request #630 from share/internalise-force-subscribe
Browse files Browse the repository at this point in the history
🏷️ Mark `presence.subscribe()` options as internal
  • Loading branch information
alecgibson authored Oct 10, 2023
2 parents e7e77ba + cc4cccb commit 6831fa8
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 6831fa8

Please sign in to comment.