[backend/federation] Fix GTS compatibility

Another day, another fedi software referencing an invalid/nonexistent context by link.
This commit is contained in:
Laura Hausmann 2024-08-12 19:10:05 +02:00
parent a58605f4be
commit 7484db23c5
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
3 changed files with 20 additions and 1 deletions

View file

@ -8,6 +8,7 @@
"@id": "http://joinmastodon.org/ns#featured", "@id": "http://joinmastodon.org/ns#featured",
"@type": "@id" "@type": "@id"
}, },
"EmojiReact": "http://litepub.social/ns#EmojiReact" "EmojiReact": "http://litepub.social/ns#EmojiReact",
"sensitive": "https://www.w3.org/ns/activitystreams#sensitive"
} }
} }

View file

@ -0,0 +1,17 @@
{
"@context": {
"gts": "https://gotosocial.org/ns#",
"interactionPolicy": "gts:interactionPolicy",
"canLike": "gts:canLike",
"canReply": "gts:canReply",
"canAnnounce": "gts:canAnnounce",
"always": {
"@id": "gts:always",
"@type": "@id"
},
"approvalRequired": {
"@id": "gts:approvalRequired",
"@type": "@id"
}
}
}

View file

@ -18,6 +18,7 @@ public static class LdHelpers
["https://www.w3.org/ns/activitystreams"] = GetPreloadedContext("as.json"), ["https://www.w3.org/ns/activitystreams"] = GetPreloadedContext("as.json"),
["https://w3id.org/security/v1"] = GetPreloadedContext("security.json"), ["https://w3id.org/security/v1"] = GetPreloadedContext("security.json"),
["http://joinmastodon.org/ns"] = GetPreloadedContext("toot.json"), ["http://joinmastodon.org/ns"] = GetPreloadedContext("toot.json"),
["https://gotosocial.org/ns"] = GetPreloadedContext("gts.json"),
["http://schema.org/"] = GetPreloadedContext("schema.json"), ["http://schema.org/"] = GetPreloadedContext("schema.json"),
["litepub-0.1"] = GetPreloadedContext("litepub.json") ["litepub-0.1"] = GetPreloadedContext("litepub.json")
}; };