-
-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Inclusion of invalid JSON-LD @context entries #1947
Comments
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 |
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. |
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 |
Adding to this issue that |
You also seem to be missing |
from reversing a payload, it looks like the gotosocial ns should be:
can someone confirm whether this is correct? |
Indeed, the interactionPolicy feature is still in development so we didn't put anything up at the namespace yet.
Thanks for taking a look :) Always and approvalRequired should be arrays, does There's also the |
Btw, no need to reverse a payload, current documentation for the feature is here: https://docs.gotosocial.org/en/latest/federation/posts/#interaction-policy |
I believe All values in JSON-LD (and thus in ActivityPub) can be any amount of values; 0, 1, or many (either represented as an array or as a single item).
The exact reason it's troubling to not host a context at the path is that any server that uses JSON-LD (Kroeg, and the way more popular Iceshrimp.NET) can now no longer read any objects that include this context. |
Specifically, I noticed this because someone opened a support ticket about GTS federation being broken |
Ah right thanks, I'll see if I can put something up there for now then, so you can interact with instances running GtS main that are already sending messages with |
Thanks for the details, I think this should be the context then?
|
Much appreciated :) I'll fiddle with gotosocial.org and get back to you when the document is up. |
Perfect. I've added a hotfix that intercepts the context with the above payload for the time being. |
@zotanmew @puckipedia The document is now served at https://gotosocial.org/ns :) |
Thank you! I'd leave this issue open, as the mastodon context is still invalid (it should be served inline as appropriate) My reverse engineered version of that context is
|
Thanks :) I'll try to get around to updating our go-fed fork to use that context, when time permits. |
( |
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.
The text was updated successfully, but these errors were encountered: