From 58016e12909e00984fb8b66b832e622df5caa049 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 12 Sep 2023 18:37:18 -0500 Subject: [PATCH] order by like.indexedAt --- packages/bsky/src/api/app/bsky/feed/getActorLikes.ts | 1 + packages/pds/src/app-view/api/app/bsky/feed/getActorLikes.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/bsky/src/api/app/bsky/feed/getActorLikes.ts b/packages/bsky/src/api/app/bsky/feed/getActorLikes.ts index 73b8b070262..0a1106ca7bf 100644 --- a/packages/bsky/src/api/app/bsky/feed/getActorLikes.ts +++ b/packages/bsky/src/api/app/bsky/feed/getActorLikes.ts @@ -71,6 +71,7 @@ const skeleton = async ( .selectFeedItemQb() .innerJoin('like', 'like.subject', 'feed_item.uri') .where('like.creator', '=', actorDid) + .orderBy('like.indexedAt', 'desc') const keyset = new FeedKeyset(ref('feed_item.sortAt'), ref('feed_item.cid')) diff --git a/packages/pds/src/app-view/api/app/bsky/feed/getActorLikes.ts b/packages/pds/src/app-view/api/app/bsky/feed/getActorLikes.ts index 74f1581db9a..c5cf7df93ce 100644 --- a/packages/pds/src/app-view/api/app/bsky/feed/getActorLikes.ts +++ b/packages/pds/src/app-view/api/app/bsky/feed/getActorLikes.ts @@ -55,6 +55,7 @@ export default function (server: Server, ctx: AppContext) { .selectFeedItemQb() .innerJoin('like', 'like.subject', 'feed_item.uri') .where('like.creator', '=', actorDid) + .orderBy('like.indexedAt', 'desc') // for access-based auth, enforce blocks if (requester) {