- @JsonProperty
- @JsonInclude(JsonInclude.Include.NON_NULL)
- final JsonSyncDataMessage sentMessage;
-
- @JsonProperty
- @JsonInclude(JsonInclude.Include.NON_NULL)
- final List<String> blockedNumbers;
-
- @JsonProperty
- @JsonInclude(JsonInclude.Include.NON_NULL)
- final List<String> blockedGroupIds;
-
- @JsonProperty
- @JsonInclude(JsonInclude.Include.NON_NULL)
- final List<JsonSyncReadMessage> readMessages;
-
- @JsonProperty
- @JsonInclude(JsonInclude.Include.NON_NULL)
- final JsonSyncMessageType type;
-
- JsonSyncMessage(SignalServiceSyncMessage syncMessage, Manager m) {
- this.sentMessage = syncMessage.getSent().isPresent()
- ? new JsonSyncDataMessage(syncMessage.getSent().get(), m)
+ static JsonSyncMessage from(MessageEnvelope.Sync syncMessage, Manager m) {
+ final var sentMessage = syncMessage.sent().isPresent() && syncMessage.sent().get().story().isEmpty()
+ ? JsonSyncDataMessage.from(syncMessage.sent().get(), m)