@lark-sh/client 0.1.20 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ import {
7
7
  ServerValue,
8
8
  generatePushId,
9
9
  isVolatilePath
10
- } from "../chunk-ELNTJSEE.mjs";
10
+ } from "../chunk-HHBHX2EM.mjs";
11
11
 
12
12
  // src/fb-v8/index.ts
13
13
  var DatabaseReference = class _DatabaseReference {
package/dist/index.js CHANGED
@@ -4333,6 +4333,11 @@ var LarkDatabase = class {
4333
4333
  this._domain = options.domain || DEFAULT_LARK_DOMAIN;
4334
4334
  this._currentToken = options.token || "";
4335
4335
  this._isAnonymous = !options.token && options.anonymous !== false;
4336
+ this.subscriptionManager.initialize({
4337
+ sendSubscribe: this.sendSubscribeMessage.bind(this),
4338
+ sendUnsubscribe: this.sendUnsubscribeMessage.bind(this),
4339
+ createSnapshot: this.createSnapshot.bind(this)
4340
+ });
4336
4341
  }
4337
4342
  // ============================================
4338
4343
  // Connection State
@@ -4514,13 +4519,6 @@ var LarkDatabase = class {
4514
4519
  this._state = "authenticated";
4515
4520
  this._reconnectAttempt = 0;
4516
4521
  this.fireConnectionStateChange();
4517
- if (!isReconnect) {
4518
- this.subscriptionManager.initialize({
4519
- sendSubscribe: this.sendSubscribeMessage.bind(this),
4520
- sendUnsubscribe: this.sendUnsubscribeMessage.bind(this),
4521
- createSnapshot: this.createSnapshot.bind(this)
4522
- });
4523
- }
4524
4522
  if (isReconnect) {
4525
4523
  await this.restoreAfterReconnect();
4526
4524
  }