Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Usage with ActivityStreams

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
api

Research direction

Review the issue's jsonLdDocumentLoader.addStatic call and the contexts.get result first, then check the loader documentation or implementation for the expected document shape. Done means identifying the supported ActivityStreams context-loading path and documenting or reproducing it with the provided post.

Written by the indexing model from the issue text.

Description

I have the following document that I want to sign:

const post = {
  '@context': 'https://www.w3.org/ns/activitystreams',
  type: 'Create',
  id: 'https://example.org/posts/9282e9cc-14d0-42b3-a758-d6aeca6c876b',
  to: [
    'https://example.org/followers',
  ],
  author: 'https://example.org',
  object: {
    type: 'Note',
    id: 'https://example.org/posts/d18c55d4-8a63-4181-9745-4e6cf7938fa1',
    attributedTo: 'https://example.org',
    to: [
      'https://example.org/followers',
    ],
    content: 'Just setting up my ...',
    published: new Date().toISOString(),
  },
};

I'm trying to load the context like so:

jsonLdDocumentLoader.addStatic('https://www.w3.org/ns/activitystreams', contexts.get('https://www.w3.org/ns/activitystreams'));

But then I get the following error:

TypeError: The second parameter (document) must be an object.

How can I load the appropriate context for ActivityStreams?

Dominant language
JavaScript
Stars
6
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from digitalbazaar/jsonld-document-loader

All issues in digitalbazaar/jsonld-document-loader

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.