From 5966f9efae07c4d81d0e83e3967f2189eb8a56f2 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Oct 2024 02:55:13 -0500 Subject: [PATCH] Add nostr and pleroma to v2 instance --- src/schemas/instance.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/schemas/instance.ts b/src/schemas/instance.ts index 7a37a0654..786a54000 100644 --- a/src/schemas/instance.ts +++ b/src/schemas/instance.ts @@ -208,6 +208,8 @@ const instanceV2Schema = coerceObject({ domain: z.string().catch(''), icon: filteredArray(instanceIconSchema), languages: filteredArray(z.string()), + nostr: nostrSchema.optional().catch(undefined), + pleroma: pleromaSchema, registrations: registrationsSchema, rules: filteredArray(ruleSchema), source_url: z.string().url().optional().catch(undefined), @@ -229,6 +231,8 @@ function upgradeInstance(v1: InstanceV1): InstanceV2 { domain: v1.uri, icon: [], languages: v1.languages, + nostr: v1.nostr, + pleroma: v1.pleroma, registrations: { approval_required: v1.approval_required, enabled: v1.registrations,