aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/model/Message.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-04-26 09:11:53 +0300
committerGravatar Vitaly Takmazov2023-04-26 09:12:11 +0300
commit90201606bb485988f5a85cd578f3f5b8ecddf4db (patch)
tree009e6691d9b32e1cb8605592fcaeed2b8e90977a /src/main/java/com/juick/model/Message.java
parentbd521d4b86f9b3b16caaba714d04e05c2f288847 (diff)
Expose `friendsOnly` message property over API
Diffstat (limited to 'src/main/java/com/juick/model/Message.java')
-rw-r--r--src/main/java/com/juick/model/Message.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/com/juick/model/Message.java b/src/main/java/com/juick/model/Message.java
index d5066af6..3c86970b 100644
--- a/src/main/java/com/juick/model/Message.java
+++ b/src/main/java/com/juick/model/Message.java
@@ -30,7 +30,6 @@ import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import javax.annotation.Nonnull;
import java.io.Serializable;
import java.net.URI;
import java.time.Instant;
@@ -59,8 +58,7 @@ public class Message implements Comparable<Message>, Serializable {
@JsonIgnore
private int privacy = 1;
@XmlTransient
- @JsonIgnore
- public boolean FriendsOnly = false;
+ private boolean friendsOnly = false;
@XmlTransient
@JsonIgnore
public boolean ReadOnly = false;
@@ -105,7 +103,7 @@ public class Message implements Comparable<Message>, Serializable {
.append("rid", rid)
.append("replyto", replyto)
.append("privacy", privacy)
- .append("FriendsOnly", FriendsOnly)
+ .append("friendsOnly", isFriendsOnly())
.append("ReadOnly", ReadOnly)
.append("Hidden", Hidden)
.append("VisitorCanComment", VisitorCanComment)
@@ -394,4 +392,12 @@ public class Message implements Comparable<Message>, Serializable {
public void setSubscribed(boolean subscribed) {
this.subscribed = subscribed;
}
+
+ public boolean isFriendsOnly() {
+ return friendsOnly;
+ }
+
+ public void setFriendsOnly(boolean friendsOnly) {
+ this.friendsOnly = friendsOnly;
+ }
}