Skip to content

Some polls

Example 1: one choice

Activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "actor": "http://host.test/some/actor",
  "cc": [],
  "id": "http://host.test/activities/Xjhfp2ZqsrGavbeP",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "cc": [],
    "content": "<p>Question</p>",
    "endTime": "2026-04-18T10:48:43.260240Z",
    "id": "http://host.test/objects/fbcF_b__CzuQ-gGb",
    "oneOf": [
      {
        "name": "Answer 1",
        "replies": {
          "totalItems": 0,
          "type": "Collection"
        },
        "type": "Note"
      },
      {
        "name": "Answer 2",
        "replies": {
          "totalItems": 0,
          "type": "Collection"
        },
        "type": "Note"
      }
    ],
    "published": "2026-04-14T07:48:43Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "type": "Question",
    "updated": "2026-04-14T07:48:43.260261Z"
  },
  "published": "2026-04-14T07:48:43Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "cc": [],
  "content": "<p>Question</p>",
  "endTime": "2026-04-18T10:48:43.260240Z",
  "id": "http://host.test/objects/fbcF_b__CzuQ-gGb",
  "oneOf": [
    {
      "name": "Answer 1",
      "replies": {
        "totalItems": 0,
        "type": "Collection"
      },
      "type": "Note"
    },
    {
      "name": "Answer 2",
      "replies": {
        "totalItems": 0,
        "type": "Collection"
      },
      "type": "Note"
    }
  ],
  "published": "2026-04-14T07:48:43Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Question",
  "updated": "2026-04-14T07:48:43.260261Z"
}

Example 2: multiple choices

Activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "actor": "http://host.test/some/actor",
  "cc": [],
  "id": "http://host.test/activities/Hc5ruYg_d2bWmo7a",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "anyOf": [
      {
        "name": "Answer 1",
        "replies": {
          "totalItems": 0,
          "type": "Collection"
        },
        "type": "Note"
      },
      {
        "name": "Answer 2",
        "replies": {
          "totalItems": 0,
          "type": "Collection"
        },
        "type": "Note"
      }
    ],
    "attributedTo": "http://host.test/some/actor",
    "cc": [],
    "content": "<p>Question</p>",
    "endTime": "2026-04-18T10:48:43.260403Z",
    "id": "http://host.test/objects/5DkXNJZeLO33Bj0l",
    "published": "2026-04-14T07:48:43Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "type": "Question",
    "updated": "2026-04-14T07:48:43.260411Z"
  },
  "published": "2026-04-14T07:48:43Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "anyOf": [
    {
      "name": "Answer 1",
      "replies": {
        "totalItems": 0,
        "type": "Collection"
      },
      "type": "Note"
    },
    {
      "name": "Answer 2",
      "replies": {
        "totalItems": 0,
        "type": "Collection"
      },
      "type": "Note"
    }
  ],
  "attributedTo": "http://host.test/some/actor",
  "cc": [],
  "content": "<p>Question</p>",
  "endTime": "2026-04-18T10:48:43.260403Z",
  "id": "http://host.test/objects/5DkXNJZeLO33Bj0l",
  "published": "2026-04-14T07:48:43Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Question",
  "updated": "2026-04-14T07:48:43.260411Z"
}