Skip to content

Commit

Permalink
feat: add id to Like
Browse files Browse the repository at this point in the history
part of #12483
  • Loading branch information
oplik0 committed Apr 22, 2024
1 parent 2ce3a11 commit ab055a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/activitypub.js
Expand Up @@ -207,6 +207,7 @@ activitypubApi.like.note = enabledCheck(async (caller, { pid }) => {
}

await activitypub.send('uid', caller.uid, [uid], {
id: `${nconf.get('url')}/uid/${caller.uid}#activity/like/${encodeURIComponent(pid)}`,
type: 'Like',
object: pid,
});
Expand All @@ -227,9 +228,11 @@ activitypubApi.undo.like = enabledCheck(async (caller, { pid }) => {
}

await activitypub.send('uid', caller.uid, [uid], {
id: `${nconf.get('url')}/uid/${caller.uid}#activity/undo:like/${encodeURIComponent(pid)}`,
type: 'Undo',
object: {
actor: `${nconf.get('url')}/uid/${caller.uid}`,
id: `${nconf.get('url')}/uid/${caller.uid}#activity/like/${encodeURIComponent(pid)}`,
type: 'Like',
object: pid,
},
Expand Down

0 comments on commit ab055a7

Please sign in to comment.