signal-cli/src/main/java/org/asamk/signal/json/JsonSyncDataMessage.java
2020-10-11 11:15:34 +02:00

21 lines
678 B
Java

package org.asamk.signal.json;
import org.asamk.Signal;
import org.whispersystems.signalservice.api.messages.multidevice.SentTranscriptMessage;
class JsonSyncDataMessage extends JsonDataMessage {
String destination;
JsonSyncDataMessage(SentTranscriptMessage transcriptMessage) {
super(transcriptMessage.getMessage());
if (transcriptMessage.getDestination().isPresent()) {
this.destination = transcriptMessage.getDestination().get().getLegacyIdentifier();
}
}
JsonSyncDataMessage(Signal.SyncMessageReceived messageReceived) {
super(messageReceived);
destination = messageReceived.getDestination();
}
}