Skip to content

Commit

Permalink
enhance(backend): embed liked collection into actor object
Browse files Browse the repository at this point in the history
  • Loading branch information
tesaguri committed Aug 19, 2024
1 parent f4ea906 commit 0949c0e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/backend/src/core/activitypub/ApRendererService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,16 @@ export class ApRendererService {

const hashtagTags = user.tags.map(tag => this.renderHashtag(tag));

let liked;
if (profile.publicReactions) {
const likedId = `${id}/liked`;
liked = this.renderOrderedCollection(
likedId,
undefined,
`${likedId}?page=true`,
);
}

const tag = [
...apemojis,
...hashtagTags,
Expand All @@ -486,7 +496,7 @@ export class ApRendererService {
outbox: `${id}/outbox`,
followers: `${id}/followers`,
following: `${id}/following`,
liked: `${id}/liked`,
liked,
featured: `${id}/collections/featured`,
sharedInbox: `${this.config.url}/inbox`,
endpoints: { sharedInbox: `${this.config.url}/inbox` },
Expand Down

0 comments on commit 0949c0e

Please sign in to comment.