File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
frontend/src/features/conversation/message Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -102,8 +102,12 @@ const settingsStore = useAppSettingsStore()
102102const showQuotedText = ref (false )
103103const { t } = useI18n ()
104104
105+ const participant = computed (() => {
106+ return convStore .conversation ? .participants ? .[props .message .sender_id ] ?? {}
107+ })
108+
105109const getAvatar = computed (() => {
106- return convStore . current ? . contact ? .avatar_url || ' '
110+ return participant . value ? .avatar_url || ' '
107111})
108112const sanitizedMessageContent = computed (() => {
109113 let content = props .message .content || ' '
@@ -132,13 +136,14 @@ const nonInlineAttachments = computed(() =>
132136)
133137
134138const getFullName = computed (() => {
135- const contact = convStore .current ? .contact || {}
136- return ` ${ contact .first_name || ' ' } ${ contact .last_name || ' ' } ` .trim ()
139+ const firstName = participant .value ? .first_name ?? ' User'
140+ const lastName = participant .value ? .last_name ?? ' '
141+ return ` ${ firstName} ${ lastName} `
137142})
138143
139144const avatarFallback = computed (() => {
140- const contact = convStore . current ? . contact || {}
141- return ( contact . first_name || ' ' ) .toUpperCase ().substring (0 , 2 )
145+ const firstName = participant . value ? . first_name ?? ' U '
146+ return firstName .toUpperCase ().substring (0 , 2 )
142147})
143148
144149const showEnvelope = computed (() => {
You can’t perform that action at this time.
0 commit comments