about summary refs log tree commit diff
path: root/src/state/models/feeds/posts.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/models/feeds/posts.ts')
-rw-r--r--src/state/models/feeds/posts.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/state/models/feeds/posts.ts b/src/state/models/feeds/posts.ts
index 93add8102..8bc75daa4 100644
--- a/src/state/models/feeds/posts.ts
+++ b/src/state/models/feeds/posts.ts
@@ -3,6 +3,7 @@ import {
   AppBskyFeedGetTimeline as GetTimeline,
   AppBskyFeedGetAuthorFeed as GetAuthorFeed,
   AppBskyFeedGetFeed as GetCustomFeed,
+  AppBskyFeedGetActorLikes as GetActorLikes,
 } from '@atproto/api'
 import AwaitLock from 'await-lock'
 import {bundleAsync} from 'lib/async/bundle'
@@ -57,7 +58,7 @@ export class PostsFeedModel {
 
   constructor(
     public rootStore: RootStoreModel,
-    public feedType: 'home' | 'author' | 'custom',
+    public feedType: 'home' | 'author' | 'custom' | 'likes',
     params: QueryParams,
     options?: Options,
   ) {
@@ -429,10 +430,14 @@ export class PostsFeedModel {
         res.data.feed = res.data.feed.slice(0, params.limit)
       }
       return res
-    } else {
+    } else if (this.feedType === 'author') {
       return this.rootStore.agent.getAuthorFeed(
         params as GetAuthorFeed.QueryParams,
       )
+    } else {
+      return this.rootStore.agent.getActorLikes(
+        params as GetActorLikes.QueryParams,
+      )
     }
   }
 }