diff options
author | dan <dan.abramov@gmail.com> | 2024-10-24 20:41:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-24 20:41:50 +0100 |
commit | e8a53dcea84afc3b313037dbaf059c68121eb9ab (patch) | |
tree | 43593f5bb5ab852b6c61244167d5ead31c8ec125 /src/lib | |
parent | fa4cca11fedb78b31b7b606eafa74ebc17435f24 (diff) | |
download | voidsky-e8a53dcea84afc3b313037dbaf059c68121eb9ab.tar.zst |
Refactor post meta to return PostView (#5645)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/api/resolve.ts | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/lib/api/resolve.ts b/src/lib/api/resolve.ts index 6fc57493f..277c17b7b 100644 --- a/src/lib/api/resolve.ts +++ b/src/lib/api/resolve.ts @@ -1,6 +1,5 @@ import { - AppBskyActorDefs, - AppBskyFeedPost, + AppBskyFeedDefs, AppBskyGraphStarterpack, ComAtprotoRepoStrongRef, } from '@atproto/api' @@ -41,11 +40,7 @@ type ResolvedPostRecord = { type: 'record' record: ComAtprotoRepoStrongRef.Main kind: 'post' - meta: { - text: string - indexedAt: string - author: AppBskyActorDefs.ProfileViewBasic - } + meta: AppBskyFeedDefs.PostView } type ResolvedOtherRecord = { @@ -92,11 +87,7 @@ export async function resolveLink( uri: post.uri, }, kind: 'post', - meta: { - text: AppBskyFeedPost.isRecord(post.record) ? post.record.text : '', - indexedAt: post.indexedAt, - author: post.author, - }, + meta: post, } } if (isBskyCustomFeedUrl(uri)) { |