feat(federation): Add ActivityPub bridge support with CLI command

This commit is contained in:
Jesse Wierzbinski 2024-07-16 23:29:20 +02:00
parent 153aa061f0
commit ff315af230
No known key found for this signature in database
13 changed files with 2337 additions and 15 deletions

View file

@ -471,13 +471,19 @@ export const configValidator = z.object({
software: z.enum(["lysand-ap"]).or(z.string()),
allowed_ips: z.array(z.string().trim()).default([]),
token: z.string().default(""),
url: zUrl.optional(),
})
.default({
enabled: false,
software: "lysand-ap",
allowed_ips: [],
token: "",
}),
url: "",
})
.refine(
(arg) => (arg.enabled ? arg.url : true),
"When bridge is enabled, url must be set",
),
})
.default({
blocked: [],
@ -498,6 +504,7 @@ export const configValidator = z.object({
software: "lysand-ap",
allowed_ips: [],
token: "",
url: "",
},
}),
instance: z