summaryrefslogtreecommitdiff
path: root/activitypub.js
diff options
context:
space:
mode:
authorDarius Kazemi <darius.kazemi@gmail.com>2020-01-06 23:29:24 -0800
committerDarius Kazemi <darius.kazemi@gmail.com>2020-01-06 23:29:24 -0800
commit5ffe6115740cfa293322e1961e7c9996e32ce2a4 (patch)
treebaae6484940c790bf560b32ee0cd4daa997502a5 /activitypub.js
parentf5178f1a663c721c910b793a2dfd5b2cc6ce9e76 (diff)
move function to activitypub file
Diffstat (limited to 'activitypub.js')
-rw-r--r--activitypub.js15
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,
}