1.4.0
The database structure was modified in this update. You must run php flarum migrate
after updating.
Feature changes
- Add an option to polls to allow users to vote for multiple options
- Add an option to polls to limit the amount of options users can vote for
- Reorganize help section display to always have icons and show multiple instances of info (instead of one or another depending on permissions)
- Display HTTP request error to user if voting fails
Full Changelog: 1.3.0...1.4.0
Integration changes
A new API endpoint was created for backwards compatibility. Use /fof/polls/{id}/votes
and pass the IDs of all the options the user votes for -- any missing ones will count as the user 'unvoting' those options.
/fof/polls/{id}/vote
still works for single-vote polls, but will throw aPermissionDeniedException
if you try to use it on a poll that allows multiple votes per user.
The Pusher event has also been renamed from updatedPollOption
to updatedPollOptions
. The old one is no longer fired, to avoid issues with handling it. The new one contains the new vote counts of all the changed options (those affected by the user voting or unvoting them).
The DB event PollVotesChanged
was created as well for backwards compatibility. The old PollWasVoted
will be thrown for single-vote polls, but not for polls allowing multiple options to be voted for.