Output json when receiving messages from dbus and --json parameter is given

Fixes #138
This commit is contained in:
AsamK 2020-04-03 16:22:10 +02:00
parent e04c45766d
commit ae41d0c502
15 changed files with 176 additions and 50 deletions

View file

@ -0,0 +1,29 @@
package org.asamk.signal.manager;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
class JsonStickerPack {
@JsonProperty
public String title;
@JsonProperty
public String author;
@JsonProperty
public JsonSticker cover;
@JsonProperty
public List<JsonSticker> stickers;
public static class JsonSticker {
@JsonProperty
public String emoji;
@JsonProperty
public String file;
}
}

View file

@ -21,7 +21,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import org.asamk.Signal;
import org.asamk.signal.AttachmentInvalidException;
import org.asamk.signal.GroupNotFoundException;
import org.asamk.signal.JsonStickerPack;
import org.asamk.signal.NotAGroupMemberException;
import org.asamk.signal.StickerPackInvalidException;
import org.asamk.signal.TrustLevel;