aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com/juick/Message.java
diff options
context:
space:
mode:
authorGravatar mykhailo.dubovskyi2018-04-18 15:57:53 +0300
committerGravatar Vitaly Takmazov2018-04-20 11:03:47 +0300
commit842e903d5b987dd23e82a423bddae75acdea0c9c (patch)
tree59eabfb9969b6cbe00703674f8d3ddb7d2e029e0 /juick-common/src/main/java/com/juick/Message.java
parentef1c674b0dc1979e46e970ad67ccc7a9bb67b001 (diff)
Like -> Reaction
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;
+ }
}