oicq-icalingua-plus-plus 1.24.71 → 1.24.73

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/lib/client.js CHANGED
@@ -203,6 +203,7 @@ class Client extends EventEmitter {
203
203
  msg_cnt_per_min: 0,
204
204
  remote_ip: "",
205
205
  remote_port: 0,
206
+ sso_error: 0,
206
207
  };
207
208
 
208
209
  blacklist = new Set;
@@ -380,7 +380,7 @@ async function makeForwardMsg(iterable, dm = false, target = 0) {
380
380
  this.logger.warn("invalid message id: " + fake.id);
381
381
  }
382
382
  }
383
- if (fake.bubble_id) {
383
+ if (fake.bubble_id && fake.bubble_id !== -1) {
384
384
  elements.push({
385
385
  9: {
386
386
  1: fake.bubble_id
package/lib/oicq.js CHANGED
@@ -259,7 +259,11 @@ Client.prototype._startHeartbeat = function () {
259
259
  if (this.config.useNT) {
260
260
  if (this._nt_hb_var++ >= 5) {
261
261
  this._nt_hb_var = 0;
262
- this._wt.ssoHeartbeat();
262
+ if (!await this._wt.ssoHeartbeat() && this.isOnline()) {
263
+ this.logger.warn("SsoHeartBeat timeout!");
264
+ if (!await this._wt.ssoHeartbeat() && this.isOnline())
265
+ this._socket.destroy();
266
+ }
263
267
  }
264
268
  }
265
269
  if (timestamp() - this.sig.qsign_token_time >= (60 * 60)) {
@@ -481,6 +485,7 @@ async function packetListener(pkt) {
481
485
  listeners[sso.cmd].call(this, sso.payload, sso.seq);
482
486
  this.emit("internal.sso", sso);
483
487
  } catch (e) {
488
+ ++this.stat.sso_error;
484
489
  this.logger.debug(e);
485
490
  }
486
491
  }
package/lib/wtlogin/wt.js CHANGED
@@ -370,8 +370,9 @@ class WtLogin {
370
370
  3: 53,
371
371
  4: timestamp(),
372
372
  });
373
- const pkt = await this.c.sendUni("trpc.qq_new_tech.status_svc.StatusService.SsoHeartBeat", body);
374
- return pkt;
373
+ const seq = this.c.nextSeq();
374
+ const pkt = await this._buildLoginPacket("trpc.qq_new_tech.status_svc.StatusService.SsoHeartBeat", body, 1, seq);
375
+ return this.c.send(pkt, undefined, seq).catch(NOOP);
375
376
  }
376
377
 
377
378
  async syncTimeDiff() {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "oicq-icalingua-plus-plus",
3
3
  "app_name": "oicq-icalingua-plus-plus",
4
- "version": "1.24.71",
5
- "app_version": "1.24.71",
6
- "upday": "2024/12/2",
4
+ "version": "1.24.73",
5
+ "app_version": "1.24.73",
6
+ "upday": "2024/12/5",
7
7
  "protocol_version": "v11",
8
8
  "description": "oicq(https://github.com/takayama-lily/oicq) v1 for Icalingua++",
9
9
  "main": "index.js",