@onyx-p/imlib-web 2.3.0 → 2.3.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
@@ -21189,7 +21189,7 @@ class MessageCache {
21189
21189
  if (!content) return '';
21190
21190
  try {
21191
21191
  const contentStr = JSON.stringify(content);
21192
- return contentStr;
21192
+ return aes256Encrypt(contentStr, this.encryptKey);
21193
21193
  } catch (error) {
21194
21194
  logger.error('加密消息内容失败', error);
21195
21195
  return '';
@@ -21200,7 +21200,7 @@ class MessageCache {
21200
21200
  return null;
21201
21201
  }
21202
21202
  try {
21203
- const decryptedStr = encryptedHex;
21203
+ const decryptedStr = aes256Decrypt(encryptedHex, this.encryptKey);
21204
21204
  return JSON.parse(decryptedStr);
21205
21205
  } catch (error) {
21206
21206
  logger.error('解密消息内容失败', error);
@@ -21811,11 +21811,11 @@ class LibLoader {
21811
21811
  this.watcher.onConnecting?.();
21812
21812
  }
21813
21813
  handleConnected() {
21814
- this.watcher.onConnected?.();
21815
21814
  if (accountStore.isActive) {
21816
21815
  this.handleUserConnected();
21817
21816
  synchronizeServerTime();
21818
21817
  }
21818
+ this.watcher.onConnected?.();
21819
21819
  }
21820
21820
  handleDisconnect() {
21821
21821
  this.watcher.onDisconnect?.();
package/index.umd.js CHANGED
@@ -21195,7 +21195,7 @@
21195
21195
  if (!content) return '';
21196
21196
  try {
21197
21197
  const contentStr = JSON.stringify(content);
21198
- return contentStr;
21198
+ return aes256Encrypt(contentStr, this.encryptKey);
21199
21199
  } catch (error) {
21200
21200
  logger.error('加密消息内容失败', error);
21201
21201
  return '';
@@ -21206,7 +21206,7 @@
21206
21206
  return null;
21207
21207
  }
21208
21208
  try {
21209
- const decryptedStr = encryptedHex;
21209
+ const decryptedStr = aes256Decrypt(encryptedHex, this.encryptKey);
21210
21210
  return JSON.parse(decryptedStr);
21211
21211
  } catch (error) {
21212
21212
  logger.error('解密消息内容失败', error);
@@ -21817,11 +21817,11 @@
21817
21817
  this.watcher.onConnecting?.();
21818
21818
  }
21819
21819
  handleConnected() {
21820
- this.watcher.onConnected?.();
21821
21820
  if (accountStore.isActive) {
21822
21821
  this.handleUserConnected();
21823
21822
  synchronizeServerTime();
21824
21823
  }
21824
+ this.watcher.onConnected?.();
21825
21825
  }
21826
21826
  handleDisconnect() {
21827
21827
  this.watcher.onDisconnect?.();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onyx-p/imlib-web",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "main": "index.umd.js",
5
5
  "module": "index.esm.js",
6
6
  "types": "types/index.d.ts",