X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/72390e595d1646ba8be9f0ed4455e1c8f2b48874..8a31b7f2c153e89532010b9ab58eb045ddfe43fe:/src/main/java/org/asamk/signal/json/JsonEditMessage.java diff --git a/src/main/java/org/asamk/signal/json/JsonEditMessage.java b/src/main/java/org/asamk/signal/json/JsonEditMessage.java new file mode 100644 index 00000000..193bd16a --- /dev/null +++ b/src/main/java/org/asamk/signal/json/JsonEditMessage.java @@ -0,0 +1,10 @@ +package org.asamk.signal.json; + +import org.asamk.signal.manager.api.MessageEnvelope; + +record JsonEditMessage(long targetSentTimestamp, JsonDataMessage dataMessage) { + + static JsonEditMessage from(MessageEnvelope.Edit editMessage) { + return new JsonEditMessage(editMessage.targetSentTimestamp(), JsonDataMessage.from(editMessage.dataMessage())); + } +}