mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
24 lines
838 B
Java
24 lines
838 B
Java
package org.asamk.signal;
|
|
|
|
import org.whispersystems.signalservice.api.messages.multidevice.ReadMessage;
|
|
import org.whispersystems.signalservice.api.messages.multidevice.SignalServiceSyncMessage;
|
|
|
|
import java.util.List;
|
|
|
|
class JsonSyncMessage {
|
|
JsonDataMessage sentMessage;
|
|
List<String> blockedNumbers;
|
|
List<ReadMessage> readMessages;
|
|
|
|
JsonSyncMessage(SignalServiceSyncMessage syncMessage) {
|
|
if (syncMessage.getSent().isPresent()) {
|
|
this.sentMessage = new JsonDataMessage(syncMessage.getSent().get().getMessage());
|
|
}
|
|
if (syncMessage.getBlockedList().isPresent()) {
|
|
this.blockedNumbers = syncMessage.getBlockedList().get().getNumbers();
|
|
}
|
|
if (syncMessage.getRead().isPresent()) {
|
|
this.readMessages = syncMessage.getRead().get();
|
|
}
|
|
}
|
|
}
|