···247247 }
248248 });
249249250250- if (!record.ok) throw new Error((record.data as { message?: string })?.message ?? 'Record not found');
250250+ if (!record.ok)
251251+ throw new Error((record.data as { message?: string })?.message ?? 'Record not found');
251252252253 return JSON.parse(JSON.stringify(record.data));
253254}
+2-1
src/lib/atproto/settings.ts
···2424 'site.standard.document',
2525 'xyz.statusphere.status',
2626 'community.lexicon.calendar.rsvp',
2727- 'community.lexicon.calendar.event'
2727+ 'community.lexicon.calendar.event',
2828+ 'app.nearhorizon.actor.pronouns'
2829 ],
29303031 // what types of authenticated proxied requests you can make to services
+22
src/lib/helper.ts
···291291 console.log('updating or adding publication', data.publication);
292292 }
293293294294+ // check if pronouns edited and save
295295+ if (data.pronounsRecord?.value?.sets?.length) {
296296+ const existing = data.pronounsRecord.value;
297297+ const now = new Date().toISOString();
298298+ const record: Record<string, unknown> = {
299299+ $type: 'app.nearhorizon.actor.pronouns',
300300+ sets: existing.sets,
301301+ displayMode: existing.displayMode ?? 'all',
302302+ createdAt: existing.createdAt ?? now
303303+ };
304304+ if (existing.createdAt) {
305305+ record.updatedAt = now;
306306+ }
307307+ promises.push(
308308+ putRecord({
309309+ collection: 'app.nearhorizon.actor.pronouns',
310310+ rkey: 'self',
311311+ record
312312+ })
313313+ );
314314+ }
315315+294316 await Promise.all(promises);
295317}
296318