X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/e04c45766d50d6a4e2d3c084145e2115b38bef5c..ae41d0c5026fe868c6198e1005344fc78b6e0a2c:/src/main/java/org/asamk/signal/json/JsonReceiptMessage.java diff --git a/src/main/java/org/asamk/signal/json/JsonReceiptMessage.java b/src/main/java/org/asamk/signal/json/JsonReceiptMessage.java new file mode 100644 index 00000000..1b896053 --- /dev/null +++ b/src/main/java/org/asamk/signal/json/JsonReceiptMessage.java @@ -0,0 +1,25 @@ +package org.asamk.signal.json; + +import org.whispersystems.signalservice.api.messages.SignalServiceReceiptMessage; + +import java.util.List; + +class JsonReceiptMessage { + + long when; + boolean isDelivery; + boolean isRead; + List timestamps; + + JsonReceiptMessage(SignalServiceReceiptMessage receiptMessage) { + + this.when = receiptMessage.getWhen(); + if (receiptMessage.isDeliveryReceipt()) { + this.isDelivery = true; + } + if (receiptMessage.isReadReceipt()) { + this.isRead = true; + } + this.timestamps = receiptMessage.getTimestamps(); + } +}