A third party ATProto appview
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

schema fix

+17 -2
+17 -2
server/services/xrpc/schemas/actor-schemas.ts
··· 11 11 12 12 export const getProfilesSchema = z.object({ 13 13 actors: z 14 - .union([z.string(), z.array(z.string())]) 15 - .transform((val) => (Array.isArray(val) ? val : [val])) 14 + .union([ 15 + z.string(), // Single actor or comma-separated 16 + z.array(z.string()), // Array of actors (from repeated query params) 17 + ]) 18 + .transform((val) => { 19 + // Handle array (from repeated params like ?actors=a&actors=b) 20 + if (Array.isArray(val)) { 21 + return val.filter((v) => v && v.trim() !== ''); 22 + } 23 + // Handle single string (could be comma-separated) 24 + if (typeof val === 'string') { 25 + // Split by comma and filter empty values 26 + const items = val.split(',').map((s) => s.trim()).filter((s) => s !== ''); 27 + return items.length > 0 ? items : [val.trim()]; 28 + } 29 + return []; 30 + }) 16 31 .pipe( 17 32 z 18 33 .array(z.string())