Skip to content

Alice sends her followers a message

given: "Alice" created an actor on "abel" called "Alice"

send.Alice.request.create_actor
{
  "base_url": "http://abel",
  "preferred_username": "Alice",
  "profile": {},
  "automatically_accept_followers": null,
  "name": null
}
receive.Alice.response.create_actor
{
  "attachment": null,
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1"
  ],
  "publicKey": {
    "id": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg#legacy-key-1",
    "owner": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkxBGSFu2zWMUZZ4u01o9\nP5uH+QL1exZtd4aJ0Q6SZqQunacI+ueuDMOl35iFeoWrGL7NWTleOsKidR4e0EuM\nD94dQo3GS4J19hFK/MhoEfP4rJaIL76JreI80jcJ3qe8kTsc9oYxvGpncz9sKaFX\nHLaGZnm8uAo8y5gAYD9jZAuJEs5igjijkZU59FR7EQKDuIA4m38XNp3fsBtC8SPg\nWMRDw5ot0zo8w8qL9lUpNgUuEYt+ZfYu6j//HA1Hsj90WwttWqyk9exvmcmzglGq\nyDov4ILfEEUDyMuAvTSt+ZPfGqhxqHwAoPrC08BALDd2OuxEczl3DnJiVy8/Mzx3\nbQIDAQAB\n-----END PUBLIC KEY-----\n"
  },
  "id": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
  "type": "Person",
  "inbox": "http://abel/inbox/Z8YrFlU9tfg5tEVzmSARAg",
  "outbox": "http://abel/outbox/sKpuJeRwtaEMy9f3GuEpQQ",
  "followers": "http://abel/followers/L5_8O8FNwV0V5Ibxk2rlTw",
  "following": "http://abel/following/rqz9HIozVA1md83mGX7edQ",
  "preferredUsername": "Alice",
  "name": "Alice",
  "identifiers": [
    "acct:Alice@abel",
    "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg"
  ],
  "endpoints": {
    "sharedInbox": "http://abel/shared_inbox"
  }
}

given: "Bob" created an actor on "banach" called "Bob"

send.Bob.request.create_actor
{
  "base_url": "http://banach",
  "preferred_username": "Bob",
  "profile": {},
  "automatically_accept_followers": null,
  "name": null
}
receive.Bob.response.create_actor
{
  "attachment": null,
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1"
  ],
  "publicKey": {
    "id": "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ#legacy-key-1",
    "owner": "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyjyG+pxAFD6Y16iLKNUb\nvtaA2Qj8kf5BSIRCysyzDnERyApmSsxubdaBDJKEGrykD80Eh7iuHB+BcKnDS+hH\n4ligzMMb1/9CTXaIxvrJM86hWri4h34smjbcYBcP1Enri3R1oexDx/Zoonznrm7X\nv1Gf2GbA486/aMCjrwUjBHdIPSQTKgmXcq9fPZUgAliA4tE4S3SpTjUdHtgnED3T\nosXPVyCxOHu0XS35buSh5eqVQuslVdBVe/67+B2FEOC1N/iavAMg5aFIIx/7Dm3c\ncg8mM4KlbnTnhnyvjg5qhDMDF9TFQg2lT6AVRgEb6n2bpyUmBoD2nxhCtC7mntjE\nFQIDAQAB\n-----END PUBLIC KEY-----\n"
  },
  "id": "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ",
  "type": "Person",
  "inbox": "http://banach/inbox/IPjuz0j_rdYA4UFnyBlztw",
  "outbox": "http://banach/outbox/37X8dENqX9qbzpWoTeMIQg",
  "followers": "http://banach/followers/tGhAogp3pZacyEMjcAa_Ng",
  "following": "http://banach/following/_CJAnyrTShrWkb-UNiGJww",
  "preferredUsername": "Bob",
  "name": "Bob",
  "identifiers": [
    "acct:Bob@banach",
    "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ"
  ],
  "endpoints": {
    "sharedInbox": "http://banach/shared_inbox"
  }
}

when: "Bob" sends "Alice" a Follow Activity

send.Bob.trigger.send_message
{
  "actor": "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Follow",
    "actor": "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ",
    "to": [
      "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg"
    ],
    "id": "follow:69db4ad2-2668-4e2e-b30f-62d82a2c6da9",
    "published": "2025-02-23T08:46:10Z",
    "object": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg"
  }
}
receive.Bob.outgoing
{
  "actor": "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ",
  "event_type": "outgoing",
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Follow",
      "actor": "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ",
      "to": [
        "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg"
      ],
      "id": "follow:69db4ad2-2668-4e2e-b30f-62d82a2c6da9",
      "published": "2025-02-23T08:46:10Z",
      "object": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg"
    },
    "recipients": {
      "recipients": [
        "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg"
      ],
      "public": false
    }
  }
}
receive.Alice.incoming
{
  "actor": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
  "event_type": "incoming",
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Follow",
      "actor": "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ",
      "to": [
        "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg"
      ],
      "id": "follow:69db4ad2-2668-4e2e-b30f-62d82a2c6da9",
      "published": "2025-02-23T08:46:10Z",
      "object": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg"
    },
    "recipients": {
      "recipients": [
        "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg"
      ],
      "public": false
    }
  }
}

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

send.Alice.trigger.send_message
{
  "actor": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Accept",
    "actor": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
    "to": [
      "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ"
    ],
    "published": "2025-02-23T08:46:11Z",
    "object": "follow:69db4ad2-2668-4e2e-b30f-62d82a2c6da9",
    "id": "accept:7ff3e036-cb2c-47be-8e06-3556d7a7000f"
  }
}
receive.Alice.outgoing
{
  "actor": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
  "event_type": "outgoing",
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Accept",
      "actor": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
      "to": [
        "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ"
      ],
      "published": "2025-02-23T08:46:11Z",
      "object": "follow:69db4ad2-2668-4e2e-b30f-62d82a2c6da9",
      "id": "accept:7ff3e036-cb2c-47be-8e06-3556d7a7000f"
    },
    "recipients": {
      "recipients": [
        "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ"
      ],
      "public": false
    }
  }
}
receive.Bob.incoming
{
  "actor": "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ",
  "event_type": "incoming",
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Accept",
      "actor": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
      "to": [
        "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ"
      ],
      "published": "2025-02-23T08:46:11Z",
      "object": "follow:69db4ad2-2668-4e2e-b30f-62d82a2c6da9",
      "id": "accept:7ff3e036-cb2c-47be-8e06-3556d7a7000f"
    },
    "recipients": {
      "recipients": [
        "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ"
      ],
      "public": false
    }
  }
}

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

send.Alice.trigger.send_message
{
  "actor": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Create",
    "actor": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
    "to": [
      "http://abel/followers/L5_8O8FNwV0V5Ibxk2rlTw"
    ],
    "id": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg/93f0e79d0d917453",
    "published": "2025-02-23T08:46:11Z",
    "object": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Note",
      "attributedTo": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
      "to": [
        "http://abel/followers/L5_8O8FNwV0V5Ibxk2rlTw"
      ],
      "id": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg/0483d661dd6a5d01",
      "published": "2025-02-23T08:46:11Z",
      "content": "Got milk?"
    }
  }
}
receive.Alice.outgoing
{
  "actor": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
  "event_type": "outgoing",
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Create",
      "actor": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
      "to": [
        "http://abel/followers/L5_8O8FNwV0V5Ibxk2rlTw"
      ],
      "id": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg/93f0e79d0d917453",
      "published": "2025-02-23T08:46:11Z",
      "object": {
        "@context": "https://www.w3.org/ns/activitystreams",
        "type": "Note",
        "attributedTo": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
        "to": [
          "http://abel/followers/L5_8O8FNwV0V5Ibxk2rlTw"
        ],
        "id": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg/0483d661dd6a5d01",
        "published": "2025-02-23T08:46:11Z",
        "content": "Got milk?"
      }
    },
    "recipients": {
      "recipients": [
        "http://abel/followers/L5_8O8FNwV0V5Ibxk2rlTw"
      ],
      "public": false
    }
  }
}
receive.Bob.incoming
{
  "actor": "http://banach/actor/1mH-MlRPug1uF3OYmUAMjQ",
  "event_type": "incoming",
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Create",
      "actor": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
      "to": [
        "http://abel/followers/L5_8O8FNwV0V5Ibxk2rlTw"
      ],
      "id": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg/93f0e79d0d917453",
      "published": "2025-02-23T08:46:11Z",
      "object": {
        "@context": "https://www.w3.org/ns/activitystreams",
        "type": "Note",
        "attributedTo": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg",
        "to": [
          "http://abel/followers/L5_8O8FNwV0V5Ibxk2rlTw"
        ],
        "id": "http://abel/actor/vBYdAUUVFGXOhtrRncqPOg/0483d661dd6a5d01",
        "published": "2025-02-23T08:46:11Z",
        "content": "Got milk?"
      }
    },
    "recipients": {
      "recipients": [
        "http://abel/followers/L5_8O8FNwV0V5Ibxk2rlTw"
      ],
      "public": false
    }
  }
}

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