[APP-2160] Build new standard.site link card UI (#10468)
Co-authored-by: vineyardbovines <spencer@thepope.dev> Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {type BskyAgent} from '@atproto/api'
|
||||
import {type AppBskyEmbedExternal, type BskyAgent} from '@atproto/api'
|
||||
|
||||
import {LINK_META_PROXY} from '#/lib/constants'
|
||||
import {getGiphyMetaUri} from '#/lib/strings/embed-player'
|
||||
@@ -26,7 +26,8 @@ export interface LinkMeta {
|
||||
* The AT-URI of the Atmosphere record representing this external content, if
|
||||
* it exists. Example: a site.standard.document record.
|
||||
*/
|
||||
associatedRecord?: string
|
||||
associatedRefs?: AppBskyEmbedExternal.External['associatedRefs']
|
||||
view?: AppBskyEmbedExternal.View
|
||||
}
|
||||
|
||||
export async function getLinkMeta(
|
||||
@@ -94,7 +95,8 @@ export async function getLinkMeta(
|
||||
meta.description = body.description
|
||||
meta.image = body.image
|
||||
meta.title = body.title
|
||||
meta.associatedRecord = body.associated_record
|
||||
meta.associatedRefs = body.associated_refs
|
||||
meta.view = body.view || body.external_view
|
||||
if (shouldFollowRedirect) {
|
||||
meta.url = body.url
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user