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:
766766| ` room-header-info ` | Replace the template of the room header text |
767767| ` room-options ` | Replace the template of the room options |
768768| ` 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 |
769770| ` message-failure_{{MESSAGE_ID}} ` | Replace the message failure icon |
770771| ` messages-empty ` | Replace the empty message template |
771772| ` rooms-empty ` | Replace the empty rooms template |
Original file line number Diff line number Diff line change @@ -448,6 +448,7 @@ export default {
448448 },
449449
450450 formatMessage (room , message ) {
451+ // const senderUser = room.users.find(user => user._id === message.sender_id)
451452 const formattedMessage = {
452453 ... message,
453454 ... {
Original file line number Diff line number Diff line change 3434 @click =" selectMessage"
3535 >
3636 <slot :name =" 'message_' + message._id" >
37- <div
37+ <slot
3838 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 >
4246 <div
4347 v-if =" hasSenderUserAvatar && !message.avatar"
4448 class =" vac-avatar-offset"
197201 <div class =" vac-failure-text" >!</div >
198202 </div >
199203 </slot >
200- <div
204+ <slot
201205 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 >
205213 <div
206214 v-if =" hasCurrentUserAvatar && !message.avatar"
207215 class =" vac-avatar-current-offset"
You can’t perform that action at this time.
0 commit comments