Skip to content

Commit 2ff9870

Browse files
committed
Minor clarifications from non-blocking review feedback
1 parent 2312620 commit 2ff9870

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

proposals/3381-polls.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ With consideration for extensible events, a new `m.poll` content block is define
7171
blocks might be added in the future. Clients should treat each entry similar to how they would an
7272
`m.message` event. The array is truncated to 20 maximum options.
7373

74+
Note that arrays are inherently ordered. Clients *should* render options in the order presented in
75+
the array - a future MSC may add a flag to permit rendering in a different or random order.
76+
7477
Together with content blocks from other proposals, an `m.poll.start` is described as:
7578

7679
* **Required** - An `m.text` block to act as a fallback for clients which can't process polls.
@@ -121,10 +124,13 @@ additional blocks, however as per the extensible events system, receivers which
121124
should not honour them.
122125

123126
There is deliberately no textual or renderable fallback on poll responses: the intention is that clients
124-
which don't understand how to process these events will hide/ignore them.
127+
which don't understand how to process these events will hide/ignore them. This is to mirror what a
128+
client which *does* support polls would do: they wouldn't render each vote as a new message, but would
129+
aggregate them into a single result at the end of the poll. By not having a text fallback, the vote
130+
is only revealed when the poll ends, which does have a text fallback.
125131

126-
Only a user's most recent vote (by `origin_server_ts`) is accepted, even if that event is invalid or
127-
redacted. Votes with timestamps after the poll has closed are ignored, as if they never happened. Note
132+
Only a user's most recent vote (by `origin_server_ts`) is accepted, even if that event is invalid.
133+
Votes with timestamps after the poll has closed are ignored, as if they never happened. Note
128134
that redaction currently removes the `m.relates_to` information from the event, causing the vote to be
129135
detached from the poll. In this scenario, the user's vote is *reverted* to its previous state rather
130136
than explicitly spoiled. To "unvote" or otherwise override the previous vote state, clients should send
@@ -171,7 +177,9 @@ Together with content blocks from other proposals, an `m.poll.end` is described
171177

172178
* **Required** - An `m.relates_to` block to form a reference relationship to the poll start event.
173179
* **Required** - An `m.text` block to act as a fallback for clients which can't process polls.
174-
* **Optional** - An `m.poll.results` block to show the sender's perspective of the vote results.
180+
* **Optional** - An `m.poll.results` block to show the sender's perspective of the vote results. This
181+
should not be used as a trusted block, but rather as a placeholder while the client's local results
182+
are tabulated.
175183

176184
The above describes the minimum requirements for sending an `m.poll.end` event. Senders can add additional
177185
blocks, however as per the extensible events system, receivers which understand poll events should not
@@ -382,7 +390,8 @@ and naming of fields changed. The differences are:
382390
* For `m.poll.start` / `org.matrix.msc3381.poll.start`:
383391
* `m.text` throughout becomes a single string, represented as `org.matrix.msc1767.text`
384392
* `m.poll` becomes `org.matrix.msc3381.poll.start`, retaining all other fields as described. Note the `m.text`
385-
under `question` and `answers`, and the `org.matrix.msc3381.poll` prefix for `kind` enum values.
393+
under `question` and `answers`, and the `org.matrix.msc3381.poll` prefix for `kind` enum values. `m.id` under
394+
`answers` additionally becomes `id`, without prefix.
386395
* For `m.poll.response` / `org.matrix.msc3381.poll.response`:
387396
* `m.selections` becomes an `org.matrix.msc3381.poll.response` object with a single key `answers` being the
388397
array of selections.
@@ -444,3 +453,15 @@ Examples of unstable events are:
444453
}
445454
}
446455
```
456+
457+
### Implementation considerations
458+
459+
Client authors should note that as a feature using the Extensible Events system,
460+
usage of the *stable* event types in regular room versions is not permitted. As
461+
of writing (December 2023), Extensible Events does not have a *stable* room version
462+
which supports such events, therefore meaning that clients will have to use the
463+
*unstable* event types if they intend to support polls in existing room versions.
464+
465+
When Extensible Events as a system is released in a dedicated room version, clients
466+
will be able to use the stable event types there. The unstable event types should
467+
not be used in that dedicated room version.

0 commit comments

Comments
 (0)