diff options
-rw-r--r-- | src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue | 2 | ||||
-rw-r--r-- | src/store/messagesStore.js | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue index 27fbb86c2..489f0d882 100644 --- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue +++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue @@ -375,7 +375,7 @@ export default { }, openPoll() { - if (this.selfHasVoted) { + if (this.selfHasVoted || this.pollIsClosed) { this.modalPage = 'results' } else { this.modalPage = 'voting' diff --git a/src/store/messagesStore.js b/src/store/messagesStore.js index bc72557b3..b19b00545 100644 --- a/src/store/messagesStore.js +++ b/src/store/messagesStore.js @@ -422,6 +422,13 @@ const actions = { }) } + if (message.systemMessage === 'poll_closed') { + context.dispatch('getPollData', { + token: message.token, + pollId: message.messageParameters.poll.id, + }) + } + context.commit('addMessage', message) if ((message.messageType === 'comment' && message.message === '{file}' && message.messageParameters?.file) |