ATlast — you'll never need to find your favorites on another platform again. Find your favs in the ATmosphere.
atproto
16
fork

Configure Feed

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

fix(api): add follow reord interface

byarielm.fyi 3310911c 505261d3

verified
+8 -2
+8 -2
packages/api/src/services/FollowService.ts
··· 5 5 6 6 import { Agent } from '@atproto/api'; 7 7 8 + /** Shape of a follow record value from AT Protocol */ 9 + interface FollowRecordValue { 10 + subject?: string; 11 + createdAt?: string; 12 + } 13 + 8 14 interface FollowStatusResult { 9 15 [did: string]: boolean; 10 16 } ··· 46 52 47 53 // Check each record 48 54 for (const record of response.data.records) { 49 - const followRecord = record.value as any; 50 - if (followRecord?.subject && didsSet.has(followRecord.subject)) { 55 + const followRecord = record.value as FollowRecordValue; 56 + if (followRecord.subject && didsSet.has(followRecord.subject)) { 51 57 followStatus[followRecord.subject] = true; 52 58 didsSet.delete(followRecord.subject); // Found it, no need to keep checking 53 59 }