File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 6363 <span v-if =" room.lastMessage.seen" >
6464 <svg-icon name =" checkmark" class =" icon-check" />
6565 </span >
66- <span >{{ getLastUsername(room) }}</span >
67- <span >{{ room.lastMessage.content }}</span >
66+ <span >{{ getLastMessage(room) }}</span >
6867 </div >
6968 </div >
7069 </div >
@@ -131,16 +130,16 @@ export default {
131130
132131 if (user .status ) return user .status .state
133132 },
134- getLastUsername (room ) {
135- if (room .users .length <= 2 ) return
133+ getLastMessage (room ) {
134+ if (room .users .length <= 2 ) return room . lastMessage . content
136135
137136 const user = room .users .find (
138137 user => user ._id === room .lastMessage .sender_id
139138 )
140139
141- if (user ._id === this .currentUserId ) return
140+ if (user ._id === this .currentUserId ) return room . lastMessage . content
142141
143- return ` ${ user .username } - `
142+ return ` ${ user .username } - ${ room . lastMessage . content } `
144143 }
145144 }
146145}
You can’t perform that action at this time.
0 commit comments