add simple You: to chat list last message
This commit is contained in:
parent
0c5e4f89e3
commit
4a6300bbee
2 changed files with 7 additions and 4 deletions
|
@ -37,12 +37,14 @@ const ChatListItem = {
|
|||
}
|
||||
},
|
||||
messageForStatusContent () {
|
||||
const content = this.chat.lastMessage ? (this.attachmentInfo || this.chat.lastMessage.content) : ''
|
||||
|
||||
const message = this.chat.lastMessage
|
||||
const isYou = message && message.account_id === this.currentUser.id
|
||||
const content = message ? (this.attachmentInfo || message.content) : ''
|
||||
const messagePreview = isYou ? `<i>${this.$t('chats.you')}</i> ${content}` : content
|
||||
return {
|
||||
summary: '',
|
||||
statusnet_html: content,
|
||||
text: content,
|
||||
statusnet_html: messagePreview,
|
||||
text: messagePreview,
|
||||
attachments: []
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue