Make fields in json classes final and omit unnecessary nulls when serializing

Fix sender in sync read messages
This commit is contained in:
AsamK 2021-01-17 11:23:02 +01:00
parent dd4225dcb1
commit 46a4c2c0d0
16 changed files with 374 additions and 150 deletions

View file

@ -1,14 +1,23 @@
package org.asamk.signal.json;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.asamk.signal.manager.Manager;
import org.whispersystems.signalservice.api.messages.SignalServiceDataMessage.Reaction;
public class JsonReaction {
String emoji;
String targetAuthor;
long targetSentTimestamp;
boolean isRemove;
@JsonProperty
final String emoji;
@JsonProperty
final String targetAuthor;
@JsonProperty
final long targetSentTimestamp;
@JsonProperty
final boolean isRemove;
JsonReaction(Reaction reaction, Manager m) {
this.emoji = reaction.getEmoji();