feat: Attachment view improvements (#7314)

This commit is contained in:
Sivin Varghese
2023-06-19 11:16:28 +05:30
committed by GitHub
parent 86b2896333
commit 35dfff0a5b
4 changed files with 263 additions and 77 deletions

View File

@@ -52,7 +52,7 @@
{{ $t('CONVERSATION.UPLOADING_ATTACHMENTS') }}
</span>
<div v-if="!isPending && hasAttachments">
<div v-for="attachment in data.attachments" :key="attachment.id">
<div v-for="attachment in attachments" :key="attachment.id">
<bubble-image-audio-video
v-if="isAttachmentImageVideoAudio(attachment.file_type)"
:attachment="attachment"
@@ -199,6 +199,14 @@ export default {
};
},
computed: {
attachments() {
// Here it is used to get sender and created_at for each attachment
return this.data?.attachments.map(attachment => ({
...attachment,
sender: this.data.sender || {},
created_at: this.data.created_at || '',
}));
},
shouldRenderMessage() {
return (
this.hasAttachments ||