Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lexicon: Poll, Poll Answer #3298

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

keaysma
Copy link

@keaysma keaysma commented Dec 28, 2024

Summary

This is a set of 3 lexicons that are designed to allow the creation of, and interaction with polls, as part of the bsky lexicon family. Conceptually there are two parts of a poll:

  • The actual Poll: This is not defined as an independent record, but an embedded part of a Post record. A poll simply contains a question as well as a set of answers, and is represented as a JSON object. As posts are non-editable, polls are then also non-editable.
  • A Poll Answer: This is an independent record, which references a Post, in which a Poll is embedded. A Poll Answer contains an answer field, which is a single numerical value. The answer field is intended to be used with a bit mask to determine which answer OR answers an actor has selected in a poll. This sets-up the ability to allow both single-answer, as well as multi-answer polls. As independent records, it is intended that an actor could edit their own poll answer in the future.

Notes/Attribution

Based on discussion: #1310

This is PR strictly contains lexicon definitions cherry-picked from #3248. That PR contains codegen and other work, too much for an initial review. I will be keeping that PR for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant