Skip to content

Surveys/polls #65

@fernandolguevara

Description

@fernandolguevara

we could add a new to tag to allow creation of surveys/polls on nostr protocol

// create
tag: surv
options:
 - <multi|single> allow others to reply with one or multiple options
 - <ttl> TTL (in seconds|timestamp) when surv expires
 - [<choice>]: up to 4 choices each limited to 25 chars  

// reply 
tag: surv-resp
options:
 - [<choice>]: based on surv type it can have one or multi
{
    "pubkey": "<pub-key>",
    "created_at": 1000000000,
    "kind": 1,
    "tags": [
      ["t", "hastag"],
      ["surv", "<multi|single>", "<ttl>", "choice 1", "choice 2"]
    ],
    "content": "#hastag what is your favorite ...?\n",
    "id": "<event-id>"
  },
  {
    "pubkey": "<pub-key>",
    "created_at": 1000000000,
    "kind": 1,
    "tags": [
      ["p", "<pub-key-root>", "wss://..."],
      ["e", "<event-id-root>", "wss://...", "root"],
      ["t", "tag"],
      ["surv-resp", "choice 1", ...] // based on root event surv type it can have one or multi 
    ],
    "content": "hello #tag\n",
    "id": "<event-id>"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions