Fix old relay pairing URL TLS compat (#896)

This commit is contained in:
Mohamed Boudra
2026-05-10 19:29:56 +08:00
committed by GitHub
parent ef892bd27d
commit cab42985a5
4 changed files with 50 additions and 4 deletions
@@ -40,7 +40,7 @@ describe("connection offer", () => {
expect(parseConnectionOfferFromUrl(`https://app.paseo.sh/#offer=${encoded}`)).toEqual(offer);
});
it("defaults relay TLS to false when absent", () => {
it("leaves relay TLS unset when absent", () => {
expect(
ConnectionOfferSchema.parse({
v: 2,
@@ -52,7 +52,7 @@ describe("connection offer", () => {
v: 2,
serverId: "server-123",
daemonPublicKeyB64: "pubkey",
relay: { endpoint: "relay.example.com:80", useTls: false },
relay: { endpoint: "relay.example.com:80" },
});
});
@@ -12,7 +12,7 @@ export const ConnectionOfferV2Schema = z.object({
daemonPublicKeyB64: z.string().min(1),
relay: z.object({
endpoint: z.string().min(1),
useTls: z.boolean().optional().default(false),
useTls: z.boolean().optional(),
}),
});