Open erincandescent opened 1 year ago
relates to #240
BTW as a workaround for the time being you could just rehost the contexts you're referencing somewhere else. Although I'm not sure if that would terminally confuse the go-fed/activity
library
Mmm i'm also not sure... I wouldn't really like to try it tbh, it's probably just something we should fix in our fork.
I just hit this as well. http://schema.org
is a valid JSON-LD context, through a Link
header. But actually applying the schema.org
context causes name
and Person
(among with other values) to be replaced by http://schema.org/name
and http://schema.org/Person
, which makes it unusable.
Yup, makes sense! We've had this on the back burner for a while now as something to fix. It's been low priority because most other implementations don't really do anything with json-ld compaction or schemas or what have you, and fixing it requires faffing about in our go-fed/activity fork. Actually this would be a great candidate for 'bugs to fix in beta' this year.
I also just hit this, my implementation refused to fetch an actor due to the type being deserialized as http://schema.org/Person
.
The
@context
array in JSON-LD may contain two things:@context
GoToSocial includes "http://joinmastodon.org/ns" (and "http://schema.org"?). Neither serves a JSON-LD document, so they shouldn't be included:
From looking at (your fork of) the
go-fed/activity
code, it appears this comes from a fundamental misunderstanding (the code believes that JSON-LD contexts work like XML namespaces, when they do not; they are sort of an overlay on top of them)This was originally noticed as Takahe issue 223. They have a workaround, but this GTS behaviour is incorrect.