Skip to content

Bob follows Alice

given: A new user called "alice"

given: A new user called "bob"

when: "bob" sends "alice" a Follow Activity

outgoing.Follow
{
  "actor": "http://banach/actor/jRdsbVUrZkQSXfsQ_Vr6xQ",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Follow",
    "actor": "http://banach/actor/jRdsbVUrZkQSXfsQ_Vr6xQ",
    "to": [
      "http://abel/actor/xiZHcBOg06o85yxKF7PF6g"
    ],
    "id": "follow:598131f1-d04e-436f-9b7e-b641184e8f9f",
    "published": "2024-11-08T18:34:47Z",
    "object": "http://abel/actor/xiZHcBOg06o85yxKF7PF6g"
  },
  "activity_type": "Follow"
}
incoming.Follow
{
  "actor": "http://abel/actor/xiZHcBOg06o85yxKF7PF6g",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Follow",
    "actor": "http://banach/actor/jRdsbVUrZkQSXfsQ_Vr6xQ",
    "to": [
      "http://abel/actor/xiZHcBOg06o85yxKF7PF6g"
    ],
    "id": "follow:598131f1-d04e-436f-9b7e-b641184e8f9f",
    "published": "2024-11-08T18:34:47Z",
    "object": "http://abel/actor/xiZHcBOg06o85yxKF7PF6g"
  },
  "activity_type": "Follow"
}

when: "alice" sends an Accept to this Follow Activity

outgoing.Accept
{
  "actor": "http://abel/actor/xiZHcBOg06o85yxKF7PF6g",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Accept",
    "actor": "http://abel/actor/xiZHcBOg06o85yxKF7PF6g",
    "to": [
      "http://banach/actor/jRdsbVUrZkQSXfsQ_Vr6xQ"
    ],
    "published": "2024-11-08T18:34:49Z",
    "object": "follow:598131f1-d04e-436f-9b7e-b641184e8f9f"
  },
  "activity_type": "Accept"
}
incoming.Accept
{
  "actor": "http://banach/actor/jRdsbVUrZkQSXfsQ_Vr6xQ",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Accept",
    "actor": "http://abel/actor/xiZHcBOg06o85yxKF7PF6g",
    "to": [
      "http://banach/actor/jRdsbVUrZkQSXfsQ_Vr6xQ"
    ],
    "published": "2024-11-08T18:34:49Z",
    "object": "follow:598131f1-d04e-436f-9b7e-b641184e8f9f"
  },
  "activity_type": "Accept"
}

then: The "followers" collection of "alice" contains "bob"

receive.alice
{
  "action": "fetch_result",
  "actor": "http://abel/actor/xiZHcBOg06o85yxKF7PF6g",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "id": "http://abel/followers/CkGXhiqZUN8inM3XEOYTNA",
    "type": "OrderedCollection",
    "totalItems": 1,
    "orderedItems": [
      "http://banach/actor/jRdsbVUrZkQSXfsQ_Vr6xQ"
    ]
  }
}

then: The "following" collection of "bob" contains "alice"

receive.bob
{
  "action": "fetch_result",
  "actor": "http://banach/actor/jRdsbVUrZkQSXfsQ_Vr6xQ",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "id": "http://banach/following/0q5kfkAYPW0Rgx1wDiP6tg",
    "type": "OrderedCollection",
    "totalItems": 1,
    "orderedItems": [
      "http://abel/actor/xiZHcBOg06o85yxKF7PF6g"
    ]
  }
}