diff options
author | Darius Kazemi <darius.kazemi@gmail.com> | 2023-10-16 14:39:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-16 14:39:23 -0700 |
commit | 1d344601cb8b068081ad1777fefd84404e660131 (patch) | |
tree | 2bc42d4d2d7a67ee4139bddac6e3976c43f52aec /src | |
parent | f2758d9af091b92be848c256408cddea01393b54 (diff) |
Disable discoverability/indexablity for ActivityPub actors
Applying the new `indexable` attribute (and the old `discoverable` attribute) to the main ActivityPub actor for a Gathio page as described here: https://github.com/mastodon/mastodon/pull/26485
Setting everything to false since Gathio is private-by-default.
Using the `toot` namespace since that seems safe enough.
Diffstat (limited to 'src')
-rw-r--r-- | src/activitypub.js | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/activitypub.js b/src/activitypub.js index d92b399..857dce8 100644 --- a/src/activitypub.js +++ b/src/activitypub.js @@ -34,8 +34,14 @@ export function createActivityPubActor( "@context": [ "https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1", + { + "toot": "http://joinmastodon.org/ns#", + "discoverable": "toot:discoverable", + "indexable": "toot:indexable" + }, ], - + indexable: false, + discoverable: false, id: `https://${domain}/${eventID}`, type: "Person", preferredUsername: `${eventID}`, @@ -45,7 +51,8 @@ export function createActivityPubActor( summary: `<p>${description}</p>`, name: name, featured: `https://${domain}/${eventID}/featured`, - + indexable: false, + discoverable: false, publicKey: { id: `https://${domain}/${eventID}#main-key`, owner: `https://${domain}/${eventID}`, @@ -82,7 +89,17 @@ export function createActivityPubEvent( ) { const guid = crypto.randomBytes(16).toString("hex"); let eventObject = { - "@context": "https://www.w3.org/ns/activitystreams", + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://w3id.org/security/v1", + { + "toot": "http://joinmastodon.org/ns#", + "discoverable": "toot:discoverable", + "indexable": "toot:indexable" + }, + ], + indexable: false, + discoverable: false, id: `https://${domain}/${guid}`, name: name, type: "Event", |