diff options
Diffstat (limited to 'activitypub.js')
-rw-r--r-- | activitypub.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activitypub.js b/activitypub.js index 5940ac0..983738b 100644 --- a/activitypub.js +++ b/activitypub.js @@ -884,6 +884,20 @@ function processInbox(req, res) { } } +function createWebfinger(eventID, domain) { + return { + 'subject': `acct:${eventID}@${domain}`, + + 'links': [ + { + 'rel': 'self', + 'type': 'application/activity+json', + 'href': `https://${domain}/${eventID}` + } + ] + }; +} + module.exports = { processInbox, sendAcceptMessage, @@ -898,4 +912,5 @@ module.exports = { createActivityPubEvent, updateActivityPubEvent, createFeaturedPost, + createWebfinger, } |