- : new Storage.Recipient.Profile(recipient.getProfile().getLastUpdateTimestamp(),
- recipient.getProfile().getGivenName(),
- recipient.getProfile().getFamilyName(),
- recipient.getProfile().getAbout(),
- recipient.getProfile().getAboutEmoji(),
- recipient.getProfile().getAvatarUrlPath(),
- recipient.getProfile().getUnidentifiedAccessMode().name(),
- recipient.getProfile()
- .getCapabilities()
- .stream()
- .map(Enum::name)
- .collect(Collectors.toSet()));
+ : new Storage.Recipient.Profile(recipientProfile.getLastUpdateTimestamp(),
+ recipientProfile.getGivenName(),
+ recipientProfile.getFamilyName(),
+ recipientProfile.getAbout(),
+ recipientProfile.getAboutEmoji(),
+ recipientProfile.getAvatarUrlPath(),
+ recipientProfile.getPaymentAddress() == null
+ ? null
+ : base64.encodeToString(recipientProfile.getPaymentAddress()),
+ recipientProfile.getUnidentifiedAccessMode().name(),
+ recipientProfile.getCapabilities().stream().map(Enum::name).collect(Collectors.toSet()));