Skip to content

Serving ActivityPub objects #564

@silverpill

Description

@silverpill

Describe the bug

According to ActivityPub specification, servers should respond with ActivityStreams object representation to requests having application/ld+json; profile="https://www.w3.org/ns/activitystreams" in Accept header, but apparently only application/activity+json is supported

Servers ... MUST present the ActivityStreams object representation in response to application/ld+json; profile="https://www.w3.org/ns/activitystreams", and SHOULD also present the ActivityStreams representation in response to application/activity+json as well.

if strings.Contains(accept, "application/activity+json") {

Steps to reproduce (if necessary)

curl -H 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"' https://***/api/posts/***

The server returns the standard API response:

{
  "code": 200,
  "data": {
    ...
  }
}

Expected behavior

Server should return ActivityStreams object representation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfederationIssues related to federation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions