mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-03 12:50:37 +00:00
Convert RecipientAddress to record
This commit is contained in:
parent
c3a9022bec
commit
8867a7b9ee
14 changed files with 59 additions and 91 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue