Fix reading nickname from storage record

Fixes #1664
This commit is contained in:
AsamK 2025-01-14 20:24:05 +01:00
parent cbd92654cf
commit 7a25ae5b9c

View file

@ -267,8 +267,12 @@ public class ContactRecordProcessor extends DefaultStorageRecordProcessor<Signal
.withGivenName(nullIfEmpty(contactProto.systemGivenName)) .withGivenName(nullIfEmpty(contactProto.systemGivenName))
.withFamilyName(nullIfEmpty(contactProto.systemFamilyName)) .withFamilyName(nullIfEmpty(contactProto.systemFamilyName))
.withNickName(nullIfEmpty(contactProto.systemNickname)) .withNickName(nullIfEmpty(contactProto.systemNickname))
.withNickNameGivenName(nullIfEmpty(contactProto.givenName)) .withNickNameGivenName(nullIfEmpty(contactProto.nickname == null
.withNickNameFamilyName(nullIfEmpty(contactProto.familyName)) ? null
: contactProto.nickname.given))
.withNickNameFamilyName(nullIfEmpty(contactProto.nickname == null
? null
: contactProto.nickname.family))
.withNote(nullIfEmpty(contactProto.note)) .withNote(nullIfEmpty(contactProto.note))
.withUnregisteredTimestamp(contactProto.unregisteredAtTimestamp == 0 .withUnregisteredTimestamp(contactProto.unregisteredAtTimestamp == 0
? null ? null