Use system nickname or first name for incoming group calls
This commit is contained in:
parent
59b135ad7e
commit
4f97c8270c
5 changed files with 73 additions and 9 deletions
|
@ -4,7 +4,17 @@
|
|||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
|
||||
export function getParticipantName(
|
||||
participant: Readonly<Pick<ConversationType, 'firstName' | 'title'>>
|
||||
participant: Readonly<
|
||||
Pick<
|
||||
ConversationType,
|
||||
'firstName' | 'systemGivenName' | 'systemNickname' | 'title'
|
||||
>
|
||||
>
|
||||
): string {
|
||||
return participant.firstName || participant.title;
|
||||
return (
|
||||
participant.systemNickname ||
|
||||
participant.systemGivenName ||
|
||||
participant.firstName ||
|
||||
participant.title
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue