Add remote delete info to json output

Fixes #424
This commit is contained in:
AsamK 2021-01-17 11:57:46 +01:00
parent 3b29add396
commit a28ad7195c
2 changed files with 23 additions and 0 deletions

View file

@ -48,6 +48,10 @@ class JsonDataMessage {
@JsonInclude(JsonInclude.Include.NON_NULL)
final JsonSticker sticker;
@JsonProperty
@JsonInclude(JsonInclude.Include.NON_NULL)
final JsonRemoteDelete remoteDelete;
@JsonProperty
@JsonInclude(JsonInclude.Include.NON_NULL)
final JsonGroupInfo groupInfo;
@ -84,6 +88,8 @@ class JsonDataMessage {
} else {
this.mentions = List.of();
}
remoteDelete = dataMessage.getRemoteDelete().isPresent() ? new JsonRemoteDelete(dataMessage.getRemoteDelete()
.get()) : null;
if (dataMessage.getAttachments().isPresent()) {
this.attachments = dataMessage.getAttachments()
.get()
@ -102,6 +108,7 @@ class JsonDataMessage {
groupInfo = messageReceived.getGroupId().length > 0 ? new JsonGroupInfo(messageReceived.getGroupId()) : null;
expiresInSeconds = null;
viewOnce = null;
remoteDelete = null;
reaction = null; // TODO Replace these 4 with the proper commands
quote = null;
mentions = null;
@ -115,6 +122,7 @@ class JsonDataMessage {
groupInfo = messageReceived.getGroupId().length > 0 ? new JsonGroupInfo(messageReceived.getGroupId()) : null;
expiresInSeconds = null;
viewOnce = null;
remoteDelete = null;
reaction = null; // TODO Replace these 4 with the proper commands
quote = null;
mentions = null;