DEV: Add poll:voted event (#12070)

This commit is contained in:
Penar Musaraj
2021-02-12 13:06:27 -05:00
committed by GitHub
parent 46e7d303b1
commit 5d8673321f

View File

@ -962,6 +962,8 @@ export default createWidget("discourse-poll", {
})
.then(({ poll }) => {
attrs.poll.setProperties(poll);
this.appEvents.trigger("poll:voted", poll, attrs.post, attrs.vote);
if (attrs.poll.get("results") !== "on_close") {
state.showResults = true;
}