adapted chatmessage to display statuses
This commit is contained in:
parent
55917125a8
commit
a58cdd954d
9 changed files with 85 additions and 20 deletions
|
|
@ -49,15 +49,15 @@ const ChatMessage = {
|
|||
})
|
||||
},
|
||||
author() {
|
||||
return this.$store.getters.findUser(
|
||||
this.chatItem.data.account_id
|
||||
)
|
||||
const accountId = this.message.account_id || this.message.user.id
|
||||
|
||||
return this.$store.getters.findUser(accountId)
|
||||
},
|
||||
isCurrentUser() {
|
||||
return this.message.account_id === this.currentUser.id
|
||||
return this.author.id === this.currentUser.id
|
||||
},
|
||||
message() {
|
||||
return this.chatItem.data
|
||||
return this.isMessage ? this.chatItem.data : null
|
||||
},
|
||||
isMessage() {
|
||||
return this.chatItem.type === 'message'
|
||||
|
|
@ -66,7 +66,7 @@ const ChatMessage = {
|
|||
return {
|
||||
summary: '',
|
||||
emojis: this.message.emojis,
|
||||
raw_html: this.message.content || '',
|
||||
raw_html: this.message.content || this.message.raw_html || '',
|
||||
text: this.message.content || '',
|
||||
attachments: this.message.attachments,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
v-else
|
||||
class="chat-message-date-separator"
|
||||
>
|
||||
<ChatMessageDate :date="chatItem.date" />
|
||||
<ChatMessageDate :date="chatItem.date" :show-time="chatItem.isTime" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue