mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Make fields in json classes final and omit unnecessary nulls when serializing
Fix sender in sync read messages
This commit is contained in:
parent
dd4225dcb1
commit
46a4c2c0d0
16 changed files with 374 additions and 150 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue