@onyx-p/imlib-web 2.2.1 → 2.2.2

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.
package/index.esm.js CHANGED
@@ -21697,6 +21697,7 @@ class LibLoader {
21697
21697
  code: ErrorCode.BIZ_ERROR_CONNECTING
21698
21698
  };
21699
21699
  }
21700
+ webSocketServer.close();
21700
21701
  const code = await webSocketServer.connect();
21701
21702
  this.isInternalConnected = true;
21702
21703
  return {
@@ -21789,6 +21790,9 @@ class LibLoader {
21789
21790
  }
21790
21791
  handleUserConnected() {
21791
21792
  logger.info('user connected -> ', accountStore.uid.toString());
21793
+ if (!this.messageLoader) {
21794
+ this.messageLoader = new MessageLoader(this.watcher, this.options);
21795
+ }
21792
21796
  this.messageLoader?.start();
21793
21797
  setTimeout(() => {
21794
21798
  if (this.connectionStatus !== ConnectionStatus.CONNECTED) return;
@@ -29162,8 +29166,10 @@ class IMClient extends EventEmitter {
29162
29166
  return this.libLoader.disconnect();
29163
29167
  }
29164
29168
  setUserLogged(info) {
29165
- accountStore.setLogged(info);
29166
- this.libLoader.setUserLogged();
29169
+ if (info.uid !== accountStore.uid.toString()) {
29170
+ accountStore.setLogged(info);
29171
+ this.libLoader.setUserLogged();
29172
+ }
29167
29173
  }
29168
29174
  logOut() {
29169
29175
  accountStore.logOut();
package/index.umd.js CHANGED
@@ -21703,6 +21703,7 @@
21703
21703
  code: exports.ErrorCode.BIZ_ERROR_CONNECTING
21704
21704
  };
21705
21705
  }
21706
+ webSocketServer.close();
21706
21707
  const code = await webSocketServer.connect();
21707
21708
  this.isInternalConnected = true;
21708
21709
  return {
@@ -21795,6 +21796,9 @@
21795
21796
  }
21796
21797
  handleUserConnected() {
21797
21798
  logger.info('user connected -> ', accountStore.uid.toString());
21799
+ if (!this.messageLoader) {
21800
+ this.messageLoader = new MessageLoader(this.watcher, this.options);
21801
+ }
21798
21802
  this.messageLoader?.start();
21799
21803
  setTimeout(() => {
21800
21804
  if (this.connectionStatus !== exports.ConnectionStatus.CONNECTED) return;
@@ -29168,8 +29172,10 @@
29168
29172
  return this.libLoader.disconnect();
29169
29173
  }
29170
29174
  setUserLogged(info) {
29171
- accountStore.setLogged(info);
29172
- this.libLoader.setUserLogged();
29175
+ if (info.uid !== accountStore.uid.toString()) {
29176
+ accountStore.setLogged(info);
29177
+ this.libLoader.setUserLogged();
29178
+ }
29173
29179
  }
29174
29180
  logOut() {
29175
29181
  accountStore.logOut();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onyx-p/imlib-web",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "main": "index.umd.js",
5
5
  "module": "index.esm.js",
6
6
  "types": "types/index.d.ts",