Fediverse Enhancement Proposals
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fep/feps/fep-e232.md

3.2 KiB

authors status dateReceived discussionsTo
silverpill <silverpill@firemail.cc> DRAFT 2022-08-01 #14

FEP-e232: Object Links

Summary

This document proposes a way to represent text-based links to [ActivityPub] objects which are similar to mentions. One example of such link is inline quote within the value of the content property, but this proposal is not limited to any particular use case.

Requirements

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC-2119].

It is expected that software will allow users to define object links using some kind of microsyntax, similar to @mention and #hashtag microsyntaxes. The exact way of defining object links may vary depending on the use case and is out of scope of this document.

If an object's name, summary, or content has qualified links to other objects, that object SHOULD have the tag property, where each object link is represented as a Link object, as suggested by [Activity Vocabulary]. The properties of this Link object are:

  • type (REQUIRED): the type MUST be Link or a subtype.
  • mediaType (REQUIRED): the media type MUST be application/ld+json; profile="https://www.w3.org/ns/activitystreams". This specification only deals with ActivityPub objects but in practice the media type can be different and servers MAY accept object links which do not comply with the requirement.
  • href (REQUIRED): the href property MUST contain the URI of the referenced object.
  • name (OPTIONAL): the name SHOULD match the microsyntax used in object's content.
  • rel (OPTIONAL): if relevant, the rel SHOULD specify how the link is related to the current resource. Using rel can provide additional purpose to object links by signaling specific intended use-cases.

Example:

{
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Note",
    "content": "This is a quote:<br>RE: https://example.com/objects/123",
    "tag": [
        {
            "type": "Link",
            "mediaType": "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"",
            "href": "https://example.com/objects/123",
            "name": "RE: https://example.com/objects/123"
        }
    ]
}

Note that the content includes the RE: <url> microsyntax but consuming implementations are not required to parse that in order to make the appropriate associations.

Implementations

TBD

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.