Send Bluesky feeds and suggested follows more data (#3695)

* WIP

* Fix constructors

* Clean up

* Tweak

* Rm extra assignment

* Narrow down the argument

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
This commit is contained in:
Eric Bailey
2024-04-29 16:04:35 -05:00
committed by GitHub
parent d893fe005d
commit a4e34537ce
6 changed files with 91 additions and 10 deletions
+10 -1
View File
@@ -32,14 +32,22 @@ export class HomeFeedAPI implements FeedAPI {
discover: CustomFeedAPI
usingDiscover = false
itemCursor = 0
userInterests?: string
constructor({getAgent}: {getAgent: () => BskyAgent}) {
constructor({
userInterests,
getAgent,
}: {
userInterests?: string
getAgent: () => BskyAgent
}) {
this.getAgent = getAgent
this.following = new FollowingFeedAPI({getAgent})
this.discover = new CustomFeedAPI({
getAgent,
feedParams: {feed: PROD_DEFAULT_FEED('whats-hot')},
})
this.userInterests = userInterests
}
reset() {
@@ -47,6 +55,7 @@ export class HomeFeedAPI implements FeedAPI {
this.discover = new CustomFeedAPI({
getAgent: this.getAgent,
feedParams: {feed: PROD_DEFAULT_FEED('whats-hot')},
userInterests: this.userInterests,
})
this.usingDiscover = false
this.itemCursor = 0