Skip to content

Add new primary identifier; unverifiable identifier

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/1Mt0bDekkEpeyYALuSaOgQ#legacy-key-1",
    "owner": "http://abel/actor/1Mt0bDekkEpeyYALuSaOgQ",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAubvDHr6cuQhn/qF813iW\n5TEZkCB30wOrCmIom1tqIwqQgIgm0yqkiWimX1aAP3ABnSiG4eSGkrsCLf/sLsia\ngNMEiSQ4PRy4g1RRXJqRzFNijZu8xOQu17axs93BbPBwJeAPPH53b0U/FbGdeEln\niJwSAvqe9fEtMiBwL4QdTU6h2SiZ6QWKoKYLTiMPT8Bhg3pgMHd7MuQ8SWv4eJnd\nnA6P9LOCLnSIqtE/fqIJaBzz8MeTZ8fbX05egL2NvAzmpLGG6Fh/EfrLzobtrCQl\nbs3Y9ldMAqYn0niZM28HlW40y5uz+ZU6CirZ3px63JULSHsuBiyZGrwl3Jay5AAZ\nSwIDAQAB\n-----END PUBLIC KEY-----\n"
  },
  "id": "http://abel/actor/1Mt0bDekkEpeyYALuSaOgQ",
  "type": "Person",
  "inbox": "http://abel/inbox/bxe-eveg3AfP8mICcMKsfA",
  "outbox": "http://abel/outbox/DB8E1Y7aRBYoYzF4ezc8Yg",
  "followers": "http://abel/followers/9E-CPHHnYHjQE8Nfy_ItGA",
  "following": "http://abel/following/zfkSAsQPYP4ssl-Wzzf7Zg",
  "preferredUsername": "Alice",
  "name": "Alice",
  "identifiers": [
    "acct:Alice@abel",
    "http://abel/actor/1Mt0bDekkEpeyYALuSaOgQ"
  ],
  "endpoints": {
    "sharedInbox": "http://abel/shared_inbox"
  }
}

given: "Alice" adds "acct:alex@unknown.test" as a primary identifier

send.Alice.trigger.update_actor
{
  "actor": "http://abel/actor/1Mt0bDekkEpeyYALuSaOgQ",
  "profile": null,
  "autoFollow": null,
  "actions": [
    {
      "action": "create_identifier",
      "identifier": "acct:alex@unknown.test",
      "primary": true
    }
  ]
}

when: "Alice" retrieves the object with id "acct:Alice@abel"

send.Alice.request.fetch
{
  "actor": "http://abel/actor/1Mt0bDekkEpeyYALuSaOgQ",
  "uri": "acct:Alice@abel"
}
receive.Alice.response.fetch
{
  "actor": "http://abel/actor/1Mt0bDekkEpeyYALuSaOgQ",
  "uri": "acct:Alice@abel",
  "data": {
    "attachment": null,
    "@context": [
      "https://www.w3.org/ns/activitystreams",
      "https://w3id.org/security/v1"
    ],
    "publicKey": {
      "id": "http://abel/actor/1Mt0bDekkEpeyYALuSaOgQ#legacy-key-1",
      "owner": "http://abel/actor/1Mt0bDekkEpeyYALuSaOgQ",
      "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAubvDHr6cuQhn/qF813iW\n5TEZkCB30wOrCmIom1tqIwqQgIgm0yqkiWimX1aAP3ABnSiG4eSGkrsCLf/sLsia\ngNMEiSQ4PRy4g1RRXJqRzFNijZu8xOQu17axs93BbPBwJeAPPH53b0U/FbGdeEln\niJwSAvqe9fEtMiBwL4QdTU6h2SiZ6QWKoKYLTiMPT8Bhg3pgMHd7MuQ8SWv4eJnd\nnA6P9LOCLnSIqtE/fqIJaBzz8MeTZ8fbX05egL2NvAzmpLGG6Fh/EfrLzobtrCQl\nbs3Y9ldMAqYn0niZM28HlW40y5uz+ZU6CirZ3px63JULSHsuBiyZGrwl3Jay5AAZ\nSwIDAQAB\n-----END PUBLIC KEY-----\n"
    },
    "id": "http://abel/actor/1Mt0bDekkEpeyYALuSaOgQ",
    "type": "Person",
    "inbox": "http://abel/inbox/bxe-eveg3AfP8mICcMKsfA",
    "outbox": "http://abel/outbox/DB8E1Y7aRBYoYzF4ezc8Yg",
    "followers": "http://abel/followers/9E-CPHHnYHjQE8Nfy_ItGA",
    "following": "http://abel/following/zfkSAsQPYP4ssl-Wzzf7Zg",
    "preferredUsername": "Alice",
    "name": "Alice",
    "identifiers": [
      "acct:Alice@abel",
      "http://abel/actor/1Mt0bDekkEpeyYALuSaOgQ"
    ],
    "endpoints": {
      "sharedInbox": "http://abel/shared_inbox"
    }
  }
}

then: The preferred username is "Alice"

then: "acct:alex@unknown.test" is not contained in the identifiers array