- @JsonProperty
- final long timestamp;
-
- public JsonSyncReadMessage(final String sender, final long timestamp) {
- this.sender = sender;
- this.timestamp = timestamp;
+ static JsonSyncReadMessage from(final ReadMessage readMessage) {
+ final var senderAddress = readMessage.getSender();
+ final var sender = getLegacyIdentifier(senderAddress);
+ final var senderNumber = senderAddress.getNumber().orNull();
+ final var senderUuid = senderAddress.getUuid().toString();
+ final var timestamp = readMessage.getTimestamp();
+ return new JsonSyncReadMessage(sender, senderNumber, senderUuid, timestamp);