aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com/juick/Message.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-common/src/main/java/com/juick/Message.java')
-rw-r--r--juick-common/src/main/java/com/juick/Message.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/juick-common/src/main/java/com/juick/Message.java b/juick-common/src/main/java/com/juick/Message.java
index 72a25dfb..45a0fdd4 100644
--- a/juick-common/src/main/java/com/juick/Message.java
+++ b/juick-common/src/main/java/com/juick/Message.java
@@ -27,7 +27,9 @@ import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.time.Instant;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
/**
* @author Ugnich Anton
@@ -72,9 +74,12 @@ public class Message implements Comparable {
private User to;
private Recommendation Recommendation;
private String replyQuote;
+ @XmlTransient
+ private Set<Reaction> reactions;
public Message() {
tags = new ArrayList<>();
+ reactions = new HashSet<>();
}
@Override
@@ -91,6 +96,7 @@ public class Message implements Comparable {
.append("VisitorCanComment", VisitorCanComment)
.append("replies", replies)
.append("likes", likes)
+ .append("reactions", reactions)
.toString();
}
@@ -301,4 +307,14 @@ public class Message implements Comparable {
public void setUnread(boolean unread) {
this.unread = unread;
}
+
+
+ @XmlTransient
+ public Set<Reaction> getReactions() {
+ return reactions;
+ }
+
+ public void setReactions(Set<Reaction> reactions) {
+ this.reactions = reactions;
+ }
}