Jump to content

Activity Streams/Primer/Relationship type

From W3C Wiki

The Relationship type represents a relationship between two objects, usually, but not necessarily, a social relationship between actor types.

In the ActivityPub network, relationships between ActivityPub actors are more likely to be represented by the following and followers collections, and determined using the Follow, Accept, Reject, and Undo activities.

Note that the word "relationship" here is heavily overloaded and can be confusing, because the type Relationship, the relationship property, and one of the related vocabularies all use the same name.

Properties

  • relationship - defines the type of relationship that exists between the two objects. There is not a defined vocabulary for relationships in Activity Stream 2.0, however, the Relationship vocabulary has a number of social and family relationships defined that are good candidates for this property. Because of the way relationship is defined in the Activity Streams 2.0 context document, the value of the property must be a fully-specified URL, not a prefixed URL or a unprefixed vocabulary term.
  • subject is, when the relationship is asymmetrical, the origin of the relationship or the primary participant in the relationship. For example, in the parentOf relationship type, the subject is the parent.
  • object is, when the relationship is asymmetrical, the target of the relationship or the secondary participant in the relationship. For example, in the parentOf relationship type, the object is the child.

Use cases

The representing relationships section of the Activity Vocabulary describes how to create and collect Relationship objects for a person. It also describes a mechanism for offering a new relationship, using the Offer activity type, but does not define how the offer can be accepted (although the Accept activity is implied).

Recommendations

  • Avoid using the Offer activity with a Relationship object over the ActivityPub network. The Follow mechanism is more widely supported.
  • Use fully-specified URLs for the value of the relationship property.