blun-king-cli 9.1.477 → 9.1.478
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/bin/telegram-direct-focus-policy.cjs +8 -2
- package/blun.mjs +1 -0
- package/package.json +1 -1
|
@@ -165,10 +165,16 @@ function createDirectFocusController(options = {}) {
|
|
|
165
165
|
savedCheckpoint = { ...initialCheckpoint, chatId };
|
|
166
166
|
conversations.set(chatId, conversation);
|
|
167
167
|
const resumeAfterMs = Date.parse(String(initialCheckpoint.resumeAfterAt ?? ''));
|
|
168
|
-
if (!explicitPause
|
|
168
|
+
if (!explicitPause) {
|
|
169
|
+
const pausedAtMs = Date.parse(String(initialCheckpoint.pausedAt ?? ''));
|
|
170
|
+
const resumeDeadlineMs = Number.isFinite(resumeAfterMs)
|
|
171
|
+
? resumeAfterMs
|
|
172
|
+
: Number.isFinite(pausedAtMs)
|
|
173
|
+
? pausedAtMs + silenceMs
|
|
174
|
+
: now();
|
|
169
175
|
conversation.timer = setTimer(
|
|
170
176
|
() => finishConversation(chatId, conversation),
|
|
171
|
-
Math.max(0,
|
|
177
|
+
Math.max(0, resumeDeadlineMs - now()),
|
|
172
178
|
);
|
|
173
179
|
}
|
|
174
180
|
}
|
package/blun.mjs
CHANGED
|
@@ -516807,6 +516807,7 @@ var BlunTUI = class {
|
|
|
516807
516807
|
this.track("telegram_direct_checkpoint_failed", { error_type: error?.code ?? error?.name ?? "Error" });
|
|
516808
516808
|
}
|
|
516809
516809
|
this.track("telegram_direct_resume_granted");
|
|
516810
|
+
this.channelQueueDeadline.requestDeliveryNow();
|
|
516810
516811
|
this.scheduleQueueDrain();
|
|
516811
516812
|
}
|
|
516812
516813
|
});
|