We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4056d4 commit 5e06375Copy full SHA for 5e06375
src/ChatWindow/RoomsList.vue
@@ -159,9 +159,11 @@ export default {
159
user => user._id === room.lastMessage.sender_id
160
)
161
162
- if (user._id === this.currentUserId) {
163
- return content
164
- }
+ if (room.lastMessage.username) {
+ return `${room.lastMessage.username} - ${content}`
+ } else if (!user || user._id === this.currentUserId) {
165
+ return content
166
+ }
167
168
return `${user.username} - ${content}`
169
}
0 commit comments