about summary refs log tree commit diff
path: root/src/lib/api/feed/author.ts
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2023-11-30 17:11:51 +0000
committerSamuel Newman <mozzius@protonmail.com>2023-11-30 17:11:51 +0000
commitb164f151cc352c62212a815e77dbdd23be530e7f (patch)
tree4df0df19dcd07afb1909171429ddc3ebcbfa42c5 /src/lib/api/feed/author.ts
parentee5d7a63ce08f2b395c71fb35dbdb0d9bb0f1dee (diff)
parentfcd22d4ccb0718db1c9b64fccd90a8bfe3e885d4 (diff)
downloadvoidsky-b164f151cc352c62212a815e77dbdd23be530e7f.tar.zst
Merge remote-tracking branch 'upstream/main' into invite-code-warning
Diffstat (limited to 'src/lib/api/feed/author.ts')
-rw-r--r--src/lib/api/feed/author.ts11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/lib/api/feed/author.ts b/src/lib/api/feed/author.ts
index 77c167869..92df84f8b 100644
--- a/src/lib/api/feed/author.ts
+++ b/src/lib/api/feed/author.ts
@@ -1,18 +1,15 @@
 import {
   AppBskyFeedDefs,
   AppBskyFeedGetAuthorFeed as GetAuthorFeed,
-  BskyAgent,
 } from '@atproto/api'
 import {FeedAPI, FeedAPIResponse} from './types'
+import {getAgent} from '#/state/session'
 
 export class AuthorFeedAPI implements FeedAPI {
-  constructor(
-    public agent: BskyAgent,
-    public params: GetAuthorFeed.QueryParams,
-  ) {}
+  constructor(public params: GetAuthorFeed.QueryParams) {}
 
   async peekLatest(): Promise<AppBskyFeedDefs.FeedViewPost> {
-    const res = await this.agent.getAuthorFeed({
+    const res = await getAgent().getAuthorFeed({
       ...this.params,
       limit: 1,
     })
@@ -26,7 +23,7 @@ export class AuthorFeedAPI implements FeedAPI {
     cursor: string | undefined
     limit: number
   }): Promise<FeedAPIResponse> {
-    const res = await this.agent.getAuthorFeed({
+    const res = await getAgent().getAuthorFeed({
       ...this.params,
       cursor,
       limit,