@wrongstack/telegram 0.319.1 → 0.320.1
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/dist/index.js +4 -2
- package/dist/poller.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -505,6 +505,8 @@ var Poller = class _Poller {
|
|
|
505
505
|
api;
|
|
506
506
|
pollIntervalMs;
|
|
507
507
|
log;
|
|
508
|
+
// Not readonly: start() swaps in a fresh controller when a previous stop()
|
|
509
|
+
// aborted this one (see start()).
|
|
508
510
|
controller;
|
|
509
511
|
offsetStore;
|
|
510
512
|
lock;
|
|
@@ -549,6 +551,7 @@ var Poller = class _Poller {
|
|
|
549
551
|
if (this.pollActive) return;
|
|
550
552
|
this.pollActive = true;
|
|
551
553
|
this._startedAt = Date.now();
|
|
554
|
+
if (this.controller.signal.aborted) this.controller = new AbortController();
|
|
552
555
|
this.acquireAndPoll();
|
|
553
556
|
}
|
|
554
557
|
stop() {
|
|
@@ -626,13 +629,12 @@ var Poller = class _Poller {
|
|
|
626
629
|
}
|
|
627
630
|
try {
|
|
628
631
|
this.onMessageUpdate(raw);
|
|
629
|
-
this.offset = upd.update_id + 1;
|
|
630
632
|
} catch (err) {
|
|
631
633
|
this.log.debug(
|
|
632
634
|
`Telegram processMessage failed: ${err instanceof Error ? err.message : String(err)}`
|
|
633
635
|
);
|
|
634
|
-
break;
|
|
635
636
|
}
|
|
637
|
+
this.offset = upd.update_id + 1;
|
|
636
638
|
}
|
|
637
639
|
if (this.offsetStore && updates.length > 0) void this.saveOffset();
|
|
638
640
|
} catch (err) {
|
package/dist/poller.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/telegram",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.320.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack plugin — Telegram bridge: send messages, receive prompts, get notified.",
|
|
6
6
|
"repository": {
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"!dist/**/*.map"
|
|
27
27
|
],
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@wrongstack/core": "0.
|
|
29
|
+
"@wrongstack/core": "0.320.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^26.2.0",
|
|
33
|
-
"@wrongstack/core": "0.
|
|
33
|
+
"@wrongstack/core": "0.320.1",
|
|
34
34
|
"typescript": "^7.0.2"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|