fix: Disable sender tooltip and copy button in deleted messages (#2637)

This commit is contained in:
Muhsin Keloth 2021-07-15 21:06:54 +05:30 committed by GitHub
parent 72069e45ef
commit 85ea56b765
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@
</div>
<div class="context-menu-wrap">
<context-menu
v-if="isBubble"
v-if="isBubble && !isMessageDeleted"
:is-open="showContextMenu"
:show-copy="hasText"
:menu-position="contextMenuPosition"
@ -196,6 +196,9 @@ export default {
hasAttachments() {
return !!(this.data.attachments && this.data.attachments.length > 0);
},
isMessageDeleted() {
return this.contentAttributes.deleted;
},
hasImageAttachment() {
if (this.hasAttachments && this.data.attachments.length > 0) {
const { attachments = [{}] } = this.data;
@ -208,6 +211,9 @@ export default {
return !!this.data.content;
},
sentByMessage() {
if (this.isMessageDeleted) {
return false;
}
const { sender } = this;
return this.data.message_type === 1 && !isEmptyObject(sender)
? {