X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/58db3cbd53f3faec94ddfcd5e029865a380e6242..46a4c2c0d0a36b7f230fc2c2d47aa371a6e02d35:/src/main/java/org/asamk/signal/json/JsonMention.java diff --git a/src/main/java/org/asamk/signal/json/JsonMention.java b/src/main/java/org/asamk/signal/json/JsonMention.java index 80683842..b6243041 100644 --- a/src/main/java/org/asamk/signal/json/JsonMention.java +++ b/src/main/java/org/asamk/signal/json/JsonMention.java @@ -1,22 +1,26 @@ package org.asamk.signal.json; +import com.fasterxml.jackson.annotation.JsonProperty; + import org.asamk.signal.manager.Manager; import org.whispersystems.signalservice.api.messages.SignalServiceDataMessage; import org.whispersystems.signalservice.api.push.SignalServiceAddress; public class JsonMention { - String name; - int start; - int length; + @JsonProperty + final String name; + + @JsonProperty + final int start; + + @JsonProperty + final int length; JsonMention(SignalServiceDataMessage.Mention mention, Manager m) { - this.name = m.resolveSignalServiceAddress( - new SignalServiceAddress(mention.getUuid(), null) - ).getLegacyIdentifier(); + this.name = m.resolveSignalServiceAddress(new SignalServiceAddress(mention.getUuid(), null)) + .getLegacyIdentifier(); this.start = mention.getStart(); this.length = mention.getLength(); - } - }