bluesky-social / atproto

Social networking technology created by Bluesky
Other
6.49k stars 452 forks source link

ListItemView doesn't have its own uri #1622

Closed gildaswise closed 11 months ago

gildaswise commented 1 year ago

Is your feature request related to a problem? Please describe.

I've implemented curated lists in deck.blue and it's mostly working fine, but for the removal process of a list item, I need to query the app.bsky.graph.listitem repo, check if any item matches the list I'm trying to manage, and then filter the related records just to get their ListItem uris to use with deleteRecord.

Describe the solution you'd like

This whole process would be easier and more performant if ListItemView just had the uri property as its Record version does when returned by listRecords.

intrnl commented 1 year ago

feel like it might also be worthwhile for the getList endpoint to also not hide list items where the subject user no longer exists...

https://github.com/bluesky-social/atproto/blob/2af3f6c783d18dd49c9ae8610cc0738b202fb672/packages/bsky/src/api/app/bsky/graph/getList.ts#L101-L105

we can turn the ListItemView into the following

export interface ListItemView {
  uri: AtUri;
  did: DID;
  subject: AppBskyActorDefs.ProfileView | null;
}