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

Support for missing ActivityPub vocabulary (sharedInbox, etc.) #24

aral opened this Issue Jan 25, 2018 · 1 comment


None yet
2 participants
Copy link

aral commented Jan 25, 2018

In trying to declare a sharedInbox endpoint on an ActivityPub Actor object, I tried:

const actor = _.person()

I get the error _TypeError: .sharedInbox is not a function.

.sharedInbox is undefined.

I can see that it is present in the activitystreams-context package in the context.json file:

    "sharedInbox": {
      "@id": "as:sharedInbox",
      "@type": "@id"

But it:

  • Doesn’t have a static method defined in activitystreams.js
  • Doesn’t have a getter defined in _models/object.js
  • Is not added to the graph in reasoner.js
  • Doesn’t have a test defined in test.js

As I’m new to the library, before I go ahead and add it in those places:

(a) Is this the right way to do it (was it just not added or am I missing something?)

(b) I see that, e.g., Image is added to the graph twice. Is this the way to do it?

  subject: as.Image,
  predicate: rdfs.subClassOf,
  object: as.Document
  subject: as.image,
  predicate: rdf.type,
  object: owl.ObjectProperty

(c) Is there a reason for all this duplication? Would it be a worthwhile use of time to try and refactor the library so that elements are defined once if possible to keep things DRY? (As I see it, to add sharedInbox, along with the other optional properties defined in ActivityPub §4.1streams, preferredUsername, proxyUrl, oauthAuthorizationEndpoint, oauthTokenEndpoint, provideClientKey, signClientKey) would require making ~four entries for each, so ~24 definitions.

(d) Given that ActivityPub is extensible, does this mean that the parser will break and need to be updated to support every possible extension statically?

Thanks in advance :)

CC @evanp

@aral aral changed the title Support for sharedInbox, etc. Support for missing ActivityPub vocabulary (sharedInbox, etc.) Jan 25, 2018

@evanp evanp self-assigned this Mar 28, 2018


This comment has been minimized.

Copy link

evanp commented Mar 28, 2018

Aww, crud. Yes, it'd be nice if stuff wasn't defined in different places. For now, I'm happy to take a PR with all these changes made.

@evanp evanp added the enhancement label Apr 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment