Skip to content

Alice sends her followers a message

given: A new user called "alice"

given: A new user called "bob"

given: "bob" follows "alice"

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

outgoing.Follow
{
  "actor": "http://banach/actor/EwX2dKZvZAZE7EYS0HZu-w",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Follow",
    "actor": "http://banach/actor/EwX2dKZvZAZE7EYS0HZu-w",
    "to": [
      "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg"
    ],
    "id": "follow:7a3821ec-5d21-4ec9-b10b-842b41a8f0ee",
    "published": "2024-11-08T18:34:51Z",
    "object": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg"
  },
  "activity_type": "Follow"
}
incoming.Follow
{
  "actor": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Follow",
    "actor": "http://banach/actor/EwX2dKZvZAZE7EYS0HZu-w",
    "to": [
      "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg"
    ],
    "id": "follow:7a3821ec-5d21-4ec9-b10b-842b41a8f0ee",
    "published": "2024-11-08T18:34:51Z",
    "object": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg"
  },
  "activity_type": "Follow"
}

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

outgoing.Accept
{
  "actor": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Accept",
    "actor": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg",
    "to": [
      "http://banach/actor/EwX2dKZvZAZE7EYS0HZu-w"
    ],
    "published": "2024-11-08T18:34:52Z",
    "object": "follow:7a3821ec-5d21-4ec9-b10b-842b41a8f0ee"
  },
  "activity_type": "Accept"
}
incoming.Accept
{
  "actor": "http://banach/actor/EwX2dKZvZAZE7EYS0HZu-w",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Accept",
    "actor": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg",
    "to": [
      "http://banach/actor/EwX2dKZvZAZE7EYS0HZu-w"
    ],
    "published": "2024-11-08T18:34:52Z",
    "object": "follow:7a3821ec-5d21-4ec9-b10b-842b41a8f0ee"
  },
  "activity_type": "Accept"
}

when: "alice" messages her followers "Got milk?"

outgoing.Create
{
  "actor": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Create",
    "actor": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg",
    "to": [
      "http://abel/followers/z20L6rjIhd1eniUqASCf7A"
    ],
    "id": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg/a83a8290a7f98c46",
    "published": "2024-11-08T18:34:53Z",
    "object": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Note",
      "attributedTo": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg",
      "to": [
        "http://abel/followers/z20L6rjIhd1eniUqASCf7A"
      ],
      "id": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg/58d0fc35d5d87344",
      "published": "2024-11-08T18:34:53Z",
      "content": "Got milk?"
    }
  },
  "activity_type": "Create"
}
incoming.Create
{
  "actor": "http://banach/actor/EwX2dKZvZAZE7EYS0HZu-w",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Create",
    "actor": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg",
    "to": [
      "http://abel/followers/z20L6rjIhd1eniUqASCf7A"
    ],
    "id": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg/a83a8290a7f98c46",
    "published": "2024-11-08T18:34:53Z",
    "object": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Note",
      "attributedTo": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg",
      "to": [
        "http://abel/followers/z20L6rjIhd1eniUqASCf7A"
      ],
      "id": "http://abel/actor/YpdiTTPGg1ZqH_DAy6hAAg/58d0fc35d5d87344",
      "published": "2024-11-08T18:34:53Z",
      "content": "Got milk?"
    }
  },
  "activity_type": "Create"
}

then: "bob" receives a message saying "Got milk?"