Use system nickname or first name for incoming group calls

This commit is contained in:
ayumi-signal 2024-02-08 07:28:34 -08:00 committed by GitHub
parent 59b135ad7e
commit 4f97c8270c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 73 additions and 9 deletions

View file

@ -20,4 +20,25 @@ describe('getParticipantName', () => {
assert.strictEqual(getParticipantName(participant), 'Foo Bar');
});
it('returns system given name if available', () => {
const participant = {
firstName: 'Foo',
systemGivenName: 'Foo from that party',
title: 'Foo Bar',
};
assert.strictEqual(getParticipantName(participant), 'Foo from that party');
});
it('returns system nickname if available', () => {
const participant = {
firstName: 'Foo',
systemGivenName: 'Foo from that party',
systemNickname: 'Foo-chan',
title: 'Foo Bar',
};
assert.strictEqual(getParticipantName(participant), 'Foo-chan');
});
});