Convert RecipientAddress to record

This commit is contained in:
AsamK 2021-12-06 18:55:37 +01:00
parent c3a9022bec
commit 8867a7b9ee
14 changed files with 59 additions and 91 deletions

View file

@ -9,8 +9,8 @@ public record JsonMention(@Deprecated String name, String number, String uuid, i
static JsonMention from(MessageEnvelope.Data.Mention mention) {
final var address = mention.recipient();
return new JsonMention(address.getLegacyIdentifier(),
address.getNumber().orElse(null),
address.getUuid().map(UUID::toString).orElse(null),
address.number().orElse(null),
address.uuid().map(UUID::toString).orElse(null),
mention.start(),
mention.length());
}