Files
moataz hjaiji 1380ca3f0b feat(polls): let the creator or a moderator close a poll (#17994)
* feat(polls): let the creator or a moderator close a poll

The End poll button is behind showEndPollButton in config.js, off by default,
since it needs the updated mod_polls_component. Visitor nodes learn about a
close from the main prosody and converge on its results.

* fix(polls): confirm ending a poll, test the visitor node paths

- Ending a poll asks for confirmation first, from one useClosePoll hook used
  by the voting form and the results on web and native.
- A refused close or vote shows a notification (lib-jitsi-meet rejects
  closePoll/answerPoll on the polls component's error reply).
- closePoll guards a missing getPolls().
- The native End poll button sits in the Skip/Submit row.
- The main prosody's close broadcast leaves out the answers, the occupants
  have them; only a visitor node sends the main prosody's answers, and the
  reducer keeps the local names of their voters.
- A visitor node replies not-allowed to a close, and handles every poll an
  update closed before going on to a new poll or vote in the same update.
- The prosody tests run a polls component as a visitor node, and check that
  a close fires poll-closed for mod_visitors.
- createPollEvent documents poll.closed.

* fix(polls): close the native end poll dialog and tell refused votes apart

The native dialog stayed open after confirming, because AbstractDialog takes
an undefined onSubmit result as a failed submit.

A refused vote said the poll had ended for any error. Only not-allowed means
that, other errors get a generic message. A late vote or a refused close also
doesn't need a sticky error, so both use the long timeout.
2026-11-05 16:25:31 -06:00
..
2025-01-09 15:04:02 -06:00