delete works
This commit is contained in:
parent
01732a52ec
commit
5e306026d8
8 changed files with 42 additions and 98 deletions
|
|
@ -43,6 +43,10 @@ const ChatMessage = {
|
|||
hour12: false,
|
||||
})
|
||||
},
|
||||
isStatus() {
|
||||
// ChatMessage only has account_id while Status has full user data
|
||||
return !!this.message.user
|
||||
},
|
||||
author() {
|
||||
const accountId = this.message.account_id || this.message.user.id
|
||||
|
||||
|
|
@ -101,7 +105,7 @@ const ChatMessage = {
|
|||
async deleteMessage() {
|
||||
const confirmed = window.confirm(this.$t('chats.delete_confirm'))
|
||||
if (confirmed) {
|
||||
await this.$store.dispatch('deleteChatMessage', {
|
||||
await this.$emit('delete', {
|
||||
messageId: this.chatItem.data.id,
|
||||
chatId: this.chatItem.data.chat_id,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue