@@ -4314,6 +4314,44 @@ const preloadedContexts: Record<string, unknown> = {
43144314 } ,
43154315 } ,
43164316 } ,
4317+
4318+ // Mastodon's "toot:" namespace. The URL http://joinmastodon.org/ns has
4319+ // *never* served a real JSON-LD context document—Mastodon has always inlined
4320+ // these term definitions directly in every outgoing @context array. However,
4321+ // some ActivityPub implementations (e.g., Bonfire) put the bare URL in their
4322+ // @context , which causes JSON-LD processors to try to dereference it and fail
4323+ // with a 404. We ship a built-in copy here so that Fedify can parse such
4324+ // documents without a network round-trip to a URL that will never resolve.
4325+ // See: https://github.com/mastodon/joinmastodon/issues/148
4326+ // https://github.com/fedify-dev/fedify/issues/630
4327+ "http://joinmastodon.org/ns" : {
4328+ "@context" : {
4329+ "toot" : "http://joinmastodon.org/ns#" ,
4330+ "Emoji" : "toot:Emoji" ,
4331+ "featured" : {
4332+ "@id" : "toot:featured" ,
4333+ "@type" : "@id" ,
4334+ } ,
4335+ "featuredTags" : {
4336+ "@id" : "toot:featuredTags" ,
4337+ "@type" : "@id" ,
4338+ } ,
4339+ "focalPoint" : {
4340+ "@container" : "@list" ,
4341+ "@id" : "toot:focalPoint" ,
4342+ } ,
4343+ "blurhash" : "toot:blurhash" ,
4344+ "discoverable" : "toot:discoverable" ,
4345+ "indexable" : "toot:indexable" ,
4346+ "memorial" : "toot:memorial" ,
4347+ "votersCount" : "toot:votersCount" ,
4348+ "suspended" : "toot:suspended" ,
4349+ "attributionDomains" : {
4350+ "@id" : "toot:attributionDomains" ,
4351+ "@type" : "@id" ,
4352+ } ,
4353+ } ,
4354+ } ,
43174355} ;
43184356
43194357export default preloadedContexts ;
0 commit comments