atmo.rsvp
5
fork

Configure Feed

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

make things faster

Florian 951610f3 52fadc94

+18 -13
+10 -9
src/lib/atproto/server/profile.ts
··· 1 1 import type { Did } from '@atcute/lexicons'; 2 - import { getDetailedProfile, describeRepo } from '../methods'; 2 + import { getProfileFromContrail, getProfileBlobUrl } from '$lib/contrail'; 3 3 4 4 const PROFILE_CACHE_TTL = 60 * 60; // 1 hour 5 5 ··· 33 33 34 34 async function fetchProfile(did: Did) { 35 35 try { 36 - let profile = await getDetailedProfile({ did }); 36 + const p = await getProfileFromContrail(did); 37 37 38 - if (!profile || profile.handle === 'handle.invalid') { 39 - const repo = await describeRepo({ did }); 40 - profile = { 41 - did, 42 - handle: repo?.handle || 'handle.invalid' 43 - } as typeof profile; 38 + if (!p || p.handle === 'handle.invalid') { 39 + return { did, handle: 'handle.invalid' }; 44 40 } 45 41 46 - return profile; 42 + return { 43 + did: p.did, 44 + handle: p.handle ?? 'handle.invalid', 45 + displayName: p.record?.displayName, 46 + avatar: p.record?.avatar ? getProfileBlobUrl(p.did, p.record.avatar) : undefined 47 + }; 47 48 } catch (e) { 48 49 console.error('Failed to load profile:', e); 49 50 return undefined;
-1
src/routes/+page.server.ts
··· 8 8 startsAtMin: now, 9 9 rsvpsGoingCountMin: 2, 10 10 hydrateRsvps: 5, 11 - profiles: true, 12 11 sort: 'startsAt', 13 12 order: 'asc', 14 13 limit: 20
-1
src/routes/p/atmosphereconf.org/+page.server.ts
··· 12 12 getProfileFromContrail(actor), 13 13 listEventRecordsFromContrail({ 14 14 actor, 15 - profiles: true, 16 15 sort: 'startsAt', 17 16 order: 'asc', 18 17 limit: 200
+8 -2
wrangler.jsonc
··· 3 3 "name": "atmo-events", 4 4 "main": ".svelte-kit/cloudflare/_worker.js", 5 5 "compatibility_date": "2025-12-25", 6 - "compatibility_flags": ["nodejs_compat_v2"], 6 + "compatibility_flags": [ 7 + "nodejs_compat_v2" 8 + ], 7 9 "assets": { 8 10 "binding": "ASSETS", 9 11 "directory": ".svelte-kit/cloudflare" ··· 22 24 { 23 25 "binding": "OAUTH_STATES", 24 26 "id": "46cfb5c0bb8c41378e757b46afd7dd35" 27 + }, 28 + { 29 + "binding": "PROFILE_CACHE", 30 + "id": "f0dd7b5baa3e498c9d762bce1599a280" 25 31 } 26 32 ] 27 - } 33 + }