Personal Telegram developer console for GitHub
fix(hardening): enable kill switch only with durable binding
davoodmehraban89 committed
Oct 5, 2026 at 16:12 UTC
352ed31bb95266d9054ef526e8924b23b9cf5aff
1 file changed
+3
-2
src/kill-switch-bot.js
+3
-2
@@ -11,8 +11,9 @@ const lockMarkup = mode => ({ inline_keyboard: [[
11
export class KillSwitchGuidedNexaDevBot extends GuidedNexaDevBot {
12
constructor(env = {}) {
13
super(env);
14
- this.killSwitch = new KillSwitch({ store: new DurableKillSwitchStoreClient({ namespace: env.KILL_SWITCH_STORE }) });
15
- this.router.killSwitch = this.killSwitch;
14
+ const store = new DurableKillSwitchStoreClient({ namespace: env.KILL_SWITCH_STORE });
15
+ this.killSwitch = new KillSwitch({ store });
16
+ if (store.isConfigured()) this.router.killSwitch = this.killSwitch;
17
}
18
19
async handleMessage(message) {