Skip to content

Commit 403ed04

Browse files
committed
fix: swapped call.src with call.cnam when the call direction is ‘in’.
1 parent 6b360f1 commit 403ed04

File tree

1 file changed

+6
-6
lines changed
  • src/renderer/src/components/Modules/NethVoice/LastCalls

1 file changed

+6
-6
lines changed

src/renderer/src/components/Modules/NethVoice/LastCalls/LastCall.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,18 @@ export function LastCall({
8484
const handleCreateContact = () => {
8585
handleSelectedCallContact(
8686
(call.direction === 'in' ? call.src : call.dst) || '',
87-
call.direction === 'out'
88-
? call?.dst_cnam || call?.dst_ccompany
89-
: call.direction === 'in'
90-
? call?.cnam || call?.ccompany
87+
call.direction === 'in'
88+
? call?.cnam || call?.ccompany
89+
: call.direction === 'out'
90+
? call?.dst_cnam || call?.dst_ccompany
9191
: undefined
9292
)
9393
showContactForm()
9494
}
9595

9696
const getCallName = (call: LastCallData) => {
9797
return `${call.direction === 'in'
98-
? (call.src || call.ccompany || t('Common.Unknown'))
98+
? (call.cnam || call.ccompany || t('Common.Unknown'))
9999
: call.direction === 'out'
100100
? (call.dst_cnam || call.dst_ccompany || t('Common.Unknown'))
101101
: t('Common.Unknown')
@@ -147,7 +147,7 @@ export function LastCall({
147147
<p className={`tooltip-username-${call?.username} font-medium text-[14px] leading-5`}>
148148
{truncate(getCallName(call), 13)}
149149
</p>
150-
<Tooltip anchorSelect={`.tooltip-username-${call?.username}`}>{call.username}</Tooltip>
150+
<Tooltip anchorSelect={`.tooltip-username-${call?.username}`}>{getCallName(call)}</Tooltip>
151151
<div className="flex flex-row gap-2 items-center">
152152
<div className={`h-4 w-4 call_${call.uniqueid?.replace('.', '_')}`}>
153153
{call.disposition === 'NO ANSWER' ? (

0 commit comments

Comments
 (0)