@llblab/pi-telegram 0.18.1 → 0.18.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.18.2: setup pairing start hotfix
4
+
5
+ - `[Setup]` `/telegram-setup` now updates the live in-memory config immediately after persisting the validated bot token and before starting polling. Impact: first-time setup no longer shows `Send /start...` followed by `Telegram bot is not configured`, and `/start` can be received without restarting Pi.
6
+
3
7
  ## 0.18.1: Windows setup transport hotfix
4
8
 
5
9
  - `[Setup]` `/telegram-setup` token validation now uses the same fallback-aware Telegram transport as normal API calls. Impact: Windows/QEMU hosts that fail native `fetch` during bot-token validation can retry through IPv4 fallback instead of failing before config is saved.
package/lib/setup.ts CHANGED
@@ -172,19 +172,21 @@ export function createTelegramSetupPromptRuntime<
172
172
  return async (ctx: TContext): Promise<void> => {
173
173
  if (!ctx.hasUI || !deps.setupGuard.start()) return;
174
174
  try {
175
- const nextConfig = await runTelegramSetup({
175
+ await runTelegramSetup({
176
176
  hasUI: ctx.hasUI,
177
177
  env: deps.env ?? process.env,
178
178
  config: deps.getConfig(),
179
179
  promptInput: (label, value) => ctx.ui.input(label, value),
180
180
  promptEditor: (label, value) => ctx.ui.editor(label, value),
181
181
  getMe: deps.getMe,
182
- persistConfig: deps.persistConfig,
182
+ persistConfig: async (config) => {
183
+ await deps.persistConfig(config);
184
+ deps.setConfig(config);
185
+ },
183
186
  notify: (message, level) => ctx.ui.notify(message, level),
184
187
  startPolling: () => deps.startPolling(ctx),
185
188
  updateStatus: () => deps.updateStatus(ctx),
186
189
  });
187
- if (nextConfig) deps.setConfig(nextConfig);
188
190
  } catch (error) {
189
191
  deps.recordRuntimeEvent?.("setup", error);
190
192
  throw error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llblab/pi-telegram",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"