[READ ONLY MIRROR] Spark Social AppView Server github.com/sprksocial/server
atproto deno hono lexicon
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix video alt text

+5 -4
+5 -4
services/appview/src/utils/post-transformer.ts
··· 1 - import type * as SoSprkFeedDefs from '../lexicon/types/so/sprk/feed/defs.js' 2 - import type { ProfileViewBasic } from '../lexicon/types/so/sprk/actor/defs.js' 1 + import { Database, PostDocument } from '../db.js' 3 2 import type { Label } from '../lexicon/types/com/atproto/label/defs.js' 3 + import type { ProfileViewBasic } from '../lexicon/types/so/sprk/actor/defs.js' 4 4 import type * as SoSprkEmbedImages from '../lexicon/types/so/sprk/embed/images.js' 5 5 import type * as SoSprkEmbedVideo from '../lexicon/types/so/sprk/embed/video.js' 6 - import { Database, PostDocument } from '../db.js' 6 + import type * as SoSprkFeedDefs from '../lexicon/types/so/sprk/feed/defs.js' 7 7 8 8 // Transform DB post to PostView format 9 9 export async function transformPostToPostView( ··· 57 57 embed = { 58 58 $type: 'so.sprk.embed.video#view', 59 59 cid: post.cid, 60 + alt: post.embed.alt, 60 61 playlist: `https://media.sprk.so/video/${post.authorDid}/${post.embed.video.ref.$link}`, 61 62 thumbnail: `https://thumb.sprk.so/${post.authorDid}/${post.embed.video.ref.$link}/thumbnail`, 62 63 } satisfies SoSprkEmbedVideo.View ··· 121 122 indexedAt: post.indexedAt, 122 123 labels, 123 124 } 124 - } 125 + }