diff options
author | Joas Schilling <coding@schilljs.com> | 2022-09-16 17:41:19 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-09-16 17:41:19 +0300 |
commit | 849878e9a09cc1232d14a8d66c8cd83c1cbccfe7 (patch) | |
tree | 85cf8eeee72a9596c6367f45c027ad886e90890b | |
parent | 0d4502c047ef5361a07532fbad9bed9a374fde2e (diff) |
Don't allow to forward pollsbugfix/noid/dont-forward-polls
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.vue | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.vue b/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.vue index de1967658..4cc00834c 100644 --- a/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.vue +++ b/src/components/MessagesList/MessagesGroup/Message/MessageButtonsBar/MessageButtonsBar.vue @@ -70,7 +70,7 @@ :size="20" /> {{ t('spreed', 'Go to file') }} </NcActionLink> - <NcActionButton v-if="!isCurrentGuest && !isFileShare && !isDeletedMessage" + <NcActionButton v-if="canForwardMessage" :close-after-click="true" @click.stop="openForwarder"> <template #icon> @@ -379,6 +379,19 @@ export default { isDeletedMessage() { return this.messageType === 'comment_deleted' }, + + isPollMessage() { + return this.messageType === 'comment' + && this.message === '{object}' + && this.messageParameters?.object?.type === 'talk-poll' + }, + + canForwardMessage() { + return !this.isCurrentGuest + && !this.isFileShare + && !this.isDeletedMessage + && !this.isPollMessage + }, }, methods: { |