server: properly parse pinned post types
This commit is contained in:
parent
9d288c0613
commit
4aae4a5ffb
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ import { db } from '@/db/postgre.js';
|
|||
import { fromHtml } from '@/mfm/from-html.js';
|
||||
import { Resolver } from '@/remote/activitypub/resolver.js';
|
||||
import { apLogger } from '../logger.js';
|
||||
import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, getApType, isActor } from '../type.js';
|
||||
import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, getApType, isActor, isPost } from '../type.js';
|
||||
import { extractApHashtags, extractEmojis } from './tag.js';
|
||||
import { resolveNote } from './note.js';
|
||||
import { resolveImage } from './image.js';
|
||||
|
@ -462,7 +462,7 @@ async function updateFeatured(userId: User['id'], resolver: Resolver) {
|
|||
// Resolve and register Notes
|
||||
const limit = promiseLimit<Note | null>(2);
|
||||
const featuredNotes = await Promise.all(items
|
||||
.filter(item => getApType(item) === 'Note') // TODO: Noteでなくてもいいかも
|
||||
.filter(item => isPost(item))
|
||||
.slice(0, 5)
|
||||
.map(item => limit(() => resolveNote(item, resolver))));
|
||||
|
||||
|
|
Loading…
Reference in a new issue