nodebb-plugin-poll 4.1.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,10 +3,56 @@
3
3
  This NodeBB plugin will allow you to add polls to posts.
4
4
 
5
5
  There's helpful modal available that will allow you to easily create a poll:
6
+
6
7
  ![](https://i.imgur.com/2fPnWLb.png)
7
8
 
8
9
  If you're willing to help, please make any improvements you want and submit a PR.
9
10
 
11
+ ## Features
12
+
13
+ ### Creating and editing polls
14
+
15
+ - Create polls from the composer (topic posts and replies) via the poll button in the formatting bar; multiple polls per post are supported
16
+ - Edit polls in the composer: change the title, add/remove options, adjust the end time and per-poll settings
17
+ - Poll creation is gated by the `poll:create` category privilege
18
+ - Polls follow their post's lifecycle — deleting a post soft-deletes its polls, restoring it restores them
19
+
20
+ ### Per-poll options
21
+
22
+ - **Title** for the poll
23
+ - **Options** — up to the site-wide maximum (default 10)
24
+ - **Maximum votes per user** — `1` for single-choice (radio buttons), higher for multi-choice (checkboxes)
25
+ - **Optional end date/time** — the poll closes automatically when reached; no more voting after that
26
+ - **Allow anonymous voting** — voters can opt to hide their identity; anonymous voters are masked in the per-option voter lists for everyone except privileged users
27
+ - **Disallow vote updates** — lock the poll so votes can't be changed once cast
28
+
29
+ ### Voting
30
+
31
+ - Logged-in users only (guests can view results if enabled in the ACP)
32
+ - Cast, change, and remove votes (subject to the per-poll settings above)
33
+ - Live results — vote changes are pushed to viewers in real time
34
+ - Per-option voter lists with percentages
35
+
36
+ ### Site-wide settings (ACP)
37
+
38
+ - Default poll title
39
+ - Maximum number of options per poll
40
+ - Default maximum votes per user
41
+ - Allow guests to view results
42
+
43
+ ## Federation
44
+
45
+ Polls federate across the fediverse as ActivityPub `Question` objects per [FEP-9967](https://codeberg.org/fediverse/fep/src/branch/main/fep/9967/fep-9967.md):
46
+
47
+ - **Inbound:** remote `Question` posts are ingested as polls and displayed with their current results. Local users can vote on remote polls, and each vote is federated back to the poll's author.
48
+ - **Outbound:** local polls are published as `Question` objects (single-choice as `oneOf`, multi-choice as `anyOf`), and votes received from remote actors are applied to the local poll's results.
49
+
50
+ Limitations:
51
+
52
+ - Only the **first** poll on a post is federated (FEP-9967 models one `Question` per poll); multiple polls per post are not supported.
53
+ - **Anonymous votes are not federated**, since FEP-9967 votes are attributed to the voter's actor.
54
+ - Votes on **remote** polls cannot be changed or removed (only new votes are federated).
55
+
10
56
  ## Installation
11
57
 
12
58
  Either through the NodeBB ACP or:
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "nodebb-plugin-poll",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "nodebb-plugin-poll",
9
- "version": "4.1.0",
9
+ "version": "4.1.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "async": "^3.2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-poll",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "NodeBB Poll Plugin",
5
5
  "main": "library.js",
6
6
  "scripts": {