fix: Disable sender tooltip and copy button in deleted messages (#2637)
This commit is contained in:
parent
72069e45ef
commit
85ea56b765
1 changed files with 7 additions and 1 deletions
|
@ -63,7 +63,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="context-menu-wrap">
|
<div class="context-menu-wrap">
|
||||||
<context-menu
|
<context-menu
|
||||||
v-if="isBubble"
|
v-if="isBubble && !isMessageDeleted"
|
||||||
:is-open="showContextMenu"
|
:is-open="showContextMenu"
|
||||||
:show-copy="hasText"
|
:show-copy="hasText"
|
||||||
:menu-position="contextMenuPosition"
|
:menu-position="contextMenuPosition"
|
||||||
|
@ -196,6 +196,9 @@ export default {
|
||||||
hasAttachments() {
|
hasAttachments() {
|
||||||
return !!(this.data.attachments && this.data.attachments.length > 0);
|
return !!(this.data.attachments && this.data.attachments.length > 0);
|
||||||
},
|
},
|
||||||
|
isMessageDeleted() {
|
||||||
|
return this.contentAttributes.deleted;
|
||||||
|
},
|
||||||
hasImageAttachment() {
|
hasImageAttachment() {
|
||||||
if (this.hasAttachments && this.data.attachments.length > 0) {
|
if (this.hasAttachments && this.data.attachments.length > 0) {
|
||||||
const { attachments = [{}] } = this.data;
|
const { attachments = [{}] } = this.data;
|
||||||
|
@ -208,6 +211,9 @@ export default {
|
||||||
return !!this.data.content;
|
return !!this.data.content;
|
||||||
},
|
},
|
||||||
sentByMessage() {
|
sentByMessage() {
|
||||||
|
if (this.isMessageDeleted) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const { sender } = this;
|
const { sender } = this;
|
||||||
return this.data.message_type === 1 && !isEmptyObject(sender)
|
return this.data.message_type === 1 && !isEmptyObject(sender)
|
||||||
? {
|
? {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue