From 97d6dfdbbcfc5367b2677afd3e1122816209922c Mon Sep 17 00:00:00 2001 From: Kathy Chan Date: Wed, 17 Nov 2021 16:00:32 -0800 Subject: [PATCH] fix(messageEdit): only allow user to edit their own message --- components/tailored/messaging/message/Message.html | 3 ++- components/tailored/messaging/message/actions/Actions.html | 5 +++-- components/tailored/messaging/message/actions/Actions.vue | 6 +++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/components/tailored/messaging/message/Message.html b/components/tailored/messaging/message/Message.html index 315d17ea43..8302d703d5 100644 --- a/components/tailored/messaging/message/Message.html +++ b/components/tailored/messaging/message/Message.html @@ -14,7 +14,8 @@ v-if="messageHover && !hideActions" :setReplyChatbarContent="setReplyChatbarContent" :emojiReaction="emojiReaction" - :editMessage="editMessage" /> + :editMessage="editMessage" + :messageOwner="this.$props.message.from" /> diff --git a/components/tailored/messaging/message/actions/Actions.html b/components/tailored/messaging/message/actions/Actions.html index e11ba096fa..5841b99382 100644 --- a/components/tailored/messaging/message/actions/Actions.html +++ b/components/tailored/messaging/message/actions/Actions.html @@ -26,9 +26,10 @@
- +
() => {}, }, + messageOwner: { + type: String, + required: true, + }, }, computed: { - ...mapState(['ui']), + ...mapState(['ui', 'accounts']) }, })