enhance(backend): embed local notes in liked collection

This commit is contained in:
Daiki Mizukami 2024-08-14 14:40:53 +09:00
parent 985d582166
commit 69bf40341d
No known key found for this signature in database
GPG key ID: 10478E598B944AA2

View file

@ -410,13 +410,13 @@ export class ActivityPubServerService {
const inStock = reactions.length === limit + 1;
if (inStock) reactions.pop();
const reactedNoteUris = await Promise.all(reactions.map(reaction => reaction.note!.uri || `${this.config.url}/notes/${reaction.note!.uri}`));
const reactedNotes = await Promise.all(reactions.map(({ note }) => note!.uri || this.apRendererService.renderNote(note!, false)));
const rendered = this.apRendererService.renderOrderedCollectionPage(
`${partOf}?${url.query({
page: 'true',
cursor,
})}`,
reactionsCount, reactedNoteUris, partOf,
reactionsCount, reactedNotes, partOf,
undefined,
inStock ? `${partOf}?${url.query({
page: 'true',