fep

FEP-dd4b: Quote Posts

Summary

This FEP describes the mechanism defined in Activity Streams 2.0 and the Activity Vocabulary for making quote posts, that is, Announce activities with additional commentary.

Motivation

Redistributing content or activities created by other actors is a key activity on the social web. The Announce activity type is defined in Activity Streams 2.0 (“AS2”) to represent this activity. Announce is used in ActivityPub to provide sharing functionality; see 7.11 Announce Activity (sharing).

The Activity object type in AS2 inherits all the properties of the Object type. This means that all activity types have a rich set of properties for representation as first-class content on the social web. The Announce type is no exception.

However, the ActivityPub specification does not describe how to use those properties to provide additional commentary, metadata, and files for the shared content. Called “quote Tweets”, “repost with comment”, or “quote posts”, this kind of extended sharing gives additional context to shared objects.

This FEP describes how to use the content property to provide this commentary, as well as other properties that may be useful in this context. It is applicable to uses of Activity Streams 2.0 in general; where it applies to ActivityPub, it is noted.

Specification

Examples

Basic Quote Post

This represents a simple quote post, where the actor is sharing a note from another actor with commentary.

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": "https://example.com/activities/aaabbbccc",
  "type": "Announce",
  "actor": "https://example.com/users/evan",
  "to": "https://example.com/users/evan/followers",
  "object": {
    "id": "https://example.com/notes/1234",
    "type": "Note",
    "attributedTo": "https://example.com/users/franklin"
  },
  "content": "I think that this is a good point and should be shared."
}

Quote Post with Attachment

This represents a quote post with an attachment, where the actor is sharing a note from another actor with commentary and an image.

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": "https://example.com/activities/dddeeefff",
  "type": "Announce",
  "actor": "https://example.com/users/evan",
  "to": "https://example.com/users/evan/followers",
  "object": {
    "id": "https://example.com/notes/1234",
    "type": "Note",
    "attributedTo": "https://example.com/users/franklin"
  },
  "content": "The author describes the rock formations of Crete; here's an example from my recent visit.",
  "attachment": {
    "type": "Link",
    "mediaType": "image/jpeg",
    "url": "https://example.com/images/1234.jpg"
  }
}

Quote Post with Hashtag

This represents a quote post with a hashtag, where the actor is sharing a note from another actor with commentary and a hashtag.

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": "https://example.com/activities/ghhiijjkk",
  "type": "Announce",
  "actor": "https://example.com/users/evan",
  "to": "https://example.com/users/evan/followers",
  "object": {
    "id": "https://example.com/notes/1234",
    "type": "Note",
    "attributedTo": "https://example.com/users/franklin"
  },
  "content": "Great description of Cretan geology; saving it for my next trip. <a href='https://example.com/tags/evanstriptocrete'>#evanstriptocrete</a>",
  "tag": {
    "type": "Hashtag",
    "href": "https://example.com/tags/evanstriptocrete",
    "name": "evanstriptocrete"
  }
}

Quote Post with Mention

This represents a quote post with a mention, where the actor is sharing a note from another actor with commentary and a mention.

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": "https://example.com/activities/lllmmnnoo",
  "type": "Announce",
  "actor": "https://example.com/users/evan",
  "to": ["https://example.com/users/evan/followers", "https://example.com/users/jeff"],
  "object": {
    "id": "https://example.com/notes/1234",
    "type": "Note",
    "attributedTo": "https://example.com/users/franklin"
  },
  "content": "<a href='https://example.com/users/jeff'>@jeff</a> you might like this Cretan geology article.",
  "tag": {
    "type": "Mention",
    "href": "https://example.com/users/jeff",
    "name": "jeff"
  }
}

The author of the quoted material can also be mentioned.

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": "https://example.com/activities/pppqqqrrr",
  "type": "Announce",
  "actor": "https://example.com/users/evan",
  "to": ["https://example.com/users/evan/followers", "https://example.com/users/franklin"],
  "object": {
    "id": "https://example.com/notes/1234",
    "type": "Note",
    "attributedTo": "https://example.com/users/franklin"
  },
  "content": "<a href='https://example.com/users/franklin'>@franklin</a> wrote this great Cretan geology article.",
  "tag": {
    "type": "Mention",
    "href": "https://example.com/users/franklin",
    "name": "franklin"
  }
}

Quote Post as Reply

A quote post can be used as a reply, often to share evidence or information from another source.

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": "https://example.com/activities/rrrsssttt",
  "type": "Note",
  "actor": "https://example.com/users/jeff",
  "to": "https://example.com/users/jeff/followers",
  "content": "Does anyone know where I can find a good article on Cretan geology?",
  "replies": {
    "id": "https://example.com/activities/rrrsssttt/replies",
    "type": "Collection",
    "totalItems": 1,
    "items": [
      {
        "id": "https://example.com/activities/lllmmnnoo",
        "type": "Announce",
        "actor": "https://example.com/users/evan",
        "object": {
          "id": "https://example.com/notes/1234",
          "type": "Note",
          "attributedTo": "https://example.com/users/franklin"
        },
        "content": "<a href='https://example.com/users/jeff'>@jeff</a> you might like this Cretan geology article.",
        "tag": {
          "type": "Mention",
          "href": "https://example.com/users/jeff",
          "name": "jeff"
        },
        "inReplyTo": "https://example.com/activities/rrrsssttt"
      }
    ]
  }
}

User interface guidance

A common representation of quote posts is to include the object of the Announce as an embedded card or other representation, with the content of the Announce object as introductory text.

Example of a quote post in a microblogging interface

Security considerations

For all Announce activities, it’s important to consider how much of the shared content to expose to the recipient of the Announce activity. Using an URL as a reference, or including a limited set of metadata as in the examples in this FEP, allows the publishing server for the shared content to control access to the content. See Inclusion of the shared object in the ActivityPub Primer for more information.

Privacy considerations

The creator of the quoted content can indicate their consent to be quoted using the shares collection. If the creator consents to being quoted, they can add the quote post to the shares collection. If they do not consent, they can omit the quote post or remove it.

Servers SHOULD provide affordances to allow creators to add to, and remove from, the shares collection. Servers may provide opt-in consent, where Announce activities are not added to the shares collection unless the original author explicitly adds them. The server MAY provide opt-out consent, where Announce activities are added to the shares collection automatically on receipt, but can be removed by the original author.

Consumers of quote posts can refer to the shares collection at any time to determine if the publisher has expressed consent. Consent may be extended or withdrawn at any time.

Consumers SHOULD indicate if the original author has consented to the quote post, and MAY obscure or hide quote posts that do not have the original author’s consent.

References

CC0 1.0 Universal (CC0 1.0) Public Domain Dedication

To the extent possible under law, the authors of this Fediverse Enhancement Proposal have waived all copyright and related or neighboring rights to this work.