fix(pairing): support legacy telegram allowFrom migration

This commit is contained in:
Peter Steinberger
2026-02-16 03:25:59 +00:00
parent 18c6f40d32
commit 6754a926ee
5 changed files with 175 additions and 8 deletions

View File

@@ -116,6 +116,11 @@ export const detectLegacyStateMigrations = vi.fn().mockResolvedValue({
targetDir: "/tmp/oauth/whatsapp/default",
hasLegacy: false,
},
pairingAllowFrom: {
legacyTelegramPath: "/tmp/oauth/telegram-allowFrom.json",
targetTelegramPath: "/tmp/oauth/telegram-default-allowFrom.json",
hasLegacyTelegram: false,
},
preview: [],
}) as unknown as MockFn;
@@ -306,6 +311,11 @@ export async function arrangeLegacyStateMigrationTest(): Promise<{
targetDir: "/tmp/oauth/whatsapp/default",
hasLegacy: false,
},
pairingAllowFrom: {
legacyTelegramPath: "/tmp/oauth/telegram-allowFrom.json",
targetTelegramPath: "/tmp/oauth/telegram-default-allowFrom.json",
hasLegacyTelegram: false,
},
preview: ["- Legacy sessions detected"],
});
runLegacyStateMigrations.mockResolvedValueOnce({