File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -766,6 +766,7 @@ Example:
766
766
| ` room-header-info ` | Replace the template of the room header text |
767
767
| ` room-options ` | Replace the template of the room options |
768
768
| ` message_{{MESSAGE_ID}} ` | Replace the template of the message (and system message) box |
769
+ | ` message-avatar_{{MESSAGE_ID}} ` | Replace the template of the message avatar |
769
770
| ` message-failure_{{MESSAGE_ID}} ` | Replace the message failure icon |
770
771
| ` messages-empty ` | Replace the empty message template |
771
772
| ` rooms-empty ` | Replace the empty rooms template |
Original file line number Diff line number Diff line change @@ -448,6 +448,7 @@ export default {
448
448
},
449
449
450
450
formatMessage (room , message ) {
451
+ // const senderUser = room.users.find(user => user._id === message.sender_id)
451
452
const formattedMessage = {
452
453
... message,
453
454
... {
Original file line number Diff line number Diff line change 34
34
@click =" selectMessage"
35
35
>
36
36
<slot :name =" 'message_' + message._id" >
37
- <div
37
+ <slot
38
38
v-if =" message.avatar && message.senderId !== currentUserId"
39
- class =" vac-avatar"
40
- :style =" { 'background-image': `url('${message.avatar}')` }"
41
- />
39
+ :name =" 'message-avatar_' + message._id"
40
+ >
41
+ <div
42
+ class =" vac-avatar"
43
+ :style =" { 'background-image': `url('${message.avatar}')` }"
44
+ />
45
+ </slot >
42
46
<div
43
47
v-if =" hasSenderUserAvatar && !message.avatar"
44
48
class =" vac-avatar-offset"
197
201
<div class =" vac-failure-text" >!</div >
198
202
</div >
199
203
</slot >
200
- <div
204
+ <slot
201
205
v-if =" message.avatar && message.senderId === currentUserId"
202
- class =" vac-avatar vac-avatar-current"
203
- :style =" { 'background-image': `url('${message.avatar}')` }"
204
- />
206
+ :name =" 'message-avatar_' + message._id"
207
+ >
208
+ <div
209
+ class =" vac-avatar vac-avatar-current"
210
+ :style =" { 'background-image': `url('${message.avatar}')` }"
211
+ />
212
+ </slot >
205
213
<div
206
214
v-if =" hasCurrentUserAvatar && !message.avatar"
207
215
class =" vac-avatar-current-offset"
You can’t perform that action at this time.
0 commit comments