parent
3b29add396
commit
a28ad7195c
@ -48,6 +48,10 @@ class JsonDataMessage {
|
|||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
final JsonSticker sticker;
|
final JsonSticker sticker;
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
final JsonRemoteDelete remoteDelete;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
final JsonGroupInfo groupInfo;
|
final JsonGroupInfo groupInfo;
|
||||||
@ -84,6 +88,8 @@ class JsonDataMessage {
|
|||||||
} else {
|
} else {
|
||||||
this.mentions = List.of();
|
this.mentions = List.of();
|
||||||
}
|
}
|
||||||
|
remoteDelete = dataMessage.getRemoteDelete().isPresent() ? new JsonRemoteDelete(dataMessage.getRemoteDelete()
|
||||||
|
.get()) : null;
|
||||||
if (dataMessage.getAttachments().isPresent()) {
|
if (dataMessage.getAttachments().isPresent()) {
|
||||||
this.attachments = dataMessage.getAttachments()
|
this.attachments = dataMessage.getAttachments()
|
||||||
.get()
|
.get()
|
||||||
@ -102,6 +108,7 @@ class JsonDataMessage {
|
|||||||
groupInfo = messageReceived.getGroupId().length > 0 ? new JsonGroupInfo(messageReceived.getGroupId()) : null;
|
groupInfo = messageReceived.getGroupId().length > 0 ? new JsonGroupInfo(messageReceived.getGroupId()) : null;
|
||||||
expiresInSeconds = null;
|
expiresInSeconds = null;
|
||||||
viewOnce = null;
|
viewOnce = null;
|
||||||
|
remoteDelete = null;
|
||||||
reaction = null; // TODO Replace these 4 with the proper commands
|
reaction = null; // TODO Replace these 4 with the proper commands
|
||||||
quote = null;
|
quote = null;
|
||||||
mentions = null;
|
mentions = null;
|
||||||
@ -115,6 +122,7 @@ class JsonDataMessage {
|
|||||||
groupInfo = messageReceived.getGroupId().length > 0 ? new JsonGroupInfo(messageReceived.getGroupId()) : null;
|
groupInfo = messageReceived.getGroupId().length > 0 ? new JsonGroupInfo(messageReceived.getGroupId()) : null;
|
||||||
expiresInSeconds = null;
|
expiresInSeconds = null;
|
||||||
viewOnce = null;
|
viewOnce = null;
|
||||||
|
remoteDelete = null;
|
||||||
reaction = null; // TODO Replace these 4 with the proper commands
|
reaction = null; // TODO Replace these 4 with the proper commands
|
||||||
quote = null;
|
quote = null;
|
||||||
mentions = null;
|
mentions = null;
|
||||||
|
15
src/main/java/org/asamk/signal/json/JsonRemoteDelete.java
Normal file
15
src/main/java/org/asamk/signal/json/JsonRemoteDelete.java
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package org.asamk.signal.json;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import org.whispersystems.signalservice.api.messages.SignalServiceDataMessage;
|
||||||
|
|
||||||
|
class JsonRemoteDelete {
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
final long timestamp;
|
||||||
|
|
||||||
|
JsonRemoteDelete(SignalServiceDataMessage.RemoteDelete remoteDelete) {
|
||||||
|
this.timestamp = remoteDelete.getTargetSentTimestamp();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user