Skip to content

Commit a7346be

Browse files
committed
feat: update phone call entries display to include author
1 parent b271eeb commit a7346be

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

frontend/src/components/Communications.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,8 @@
156156
: 'justify-start',
157157
]"
158158
>
159-
<!-- Author avatar for messages (on the left side) -->
160-
<div
161-
v-if="thread.kind !== ThreadKind.ThreadKindPhoneCall"
162-
class="flex flex-col items-center gap-1"
163-
>
159+
<!-- Author avatar for messages (including phone calls) -->
160+
<div class="flex flex-col items-center gap-1">
164161
<Image
165162
v-if="getAuthorAvatar(getMessageAuthor(thread))"
166163
:src="getAuthorAvatar(getMessageAuthor(thread))"
@@ -958,14 +955,20 @@ watch(
958955
959956
const getMessageDirection = (kind: ThreadKind): "incoming" | "outgoing" => {
960957
return kind === ThreadKind.ThreadKindTo ||
961-
kind === ThreadKind.ThreadKindTemplate
958+
kind === ThreadKind.ThreadKindTemplate ||
959+
kind === ThreadKind.ThreadKindPhoneCall
962960
? "outgoing"
963961
: "incoming";
964962
};
965963
966964
const getMessageAuthor = (thread: ThreadWithEntry): Author | null => {
967965
const direction = getMessageDirection(thread.kind);
968966
967+
// For phone calls, always show the member who made the call
968+
if (thread.kind === ThreadKind.ThreadKindPhoneCall && thread.entry?.member) {
969+
return getMemberById(thread.entry.member);
970+
}
971+
969972
if (direction === "outgoing" && thread.entry?.member) {
970973
return getMemberById(thread.entry?.member);
971974
} else if (direction === "incoming") {

0 commit comments

Comments
 (0)