handy online tools for AT Protocol boat.kelinci.net
atproto bluesky atcute typescript solidjs
20
fork

Configure Feed

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

fix: stricter service url checks in update op

Mary 4e2d7644 f582d7cf

+25 -2
+24 -1
src/api/types/plc.ts
··· 67 67 68 68 export const plcLogEntries = v.array(plcLogEntry); 69 69 70 - export const updatePayload = v.omit(updateOp, ['type', 'prev', 'sig']); 70 + export const updatePayload = v.object({ 71 + ...v.omit(updateOp, ['type', 'prev', 'sig', 'services']).entries, 72 + services: v.record( 73 + v.string(), 74 + v.variant('type', [ 75 + v.object({ 76 + type: v.union([ 77 + v.literal('AtprotoPersonalDataServer'), 78 + v.literal('AtprotoLabeler'), 79 + v.literal('BskyFeedGenerator'), 80 + v.literal('BskyNotificationService'), 81 + ]), 82 + endpoint: v.pipe( 83 + serviceUrlString, 84 + v.transform((urlString) => urlString.replace(/\/$/, '')), 85 + ), 86 + }), 87 + v.object({ 88 + type: v.string(), 89 + endpoint: v.pipe(v.string(), v.url()), 90 + }), 91 + ]), 92 + ), 93 + }); 71 94 export type PlcUpdatePayload = v.InferOutput<typeof updatePayload>;
+1 -1
src/views/identity/plc-applicator.tsx
··· 617 617 return; 618 618 } 619 619 620 - states.payload = json as any; 620 + states.payload = result.output; 621 621 622 622 setStep(5); 623 623 }}