aboutsummaryrefslogtreecommitdiff
path: root/juick-core/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-core/src/main/java/com')
-rw-r--r--juick-core/src/main/java/com/juick/Message.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/juick-core/src/main/java/com/juick/Message.java b/juick-core/src/main/java/com/juick/Message.java
index 2b66e667..cb5fe92e 100644
--- a/juick-core/src/main/java/com/juick/Message.java
+++ b/juick-core/src/main/java/com/juick/Message.java
@@ -17,6 +17,8 @@
*/
package com.juick;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.*;
@@ -36,6 +38,7 @@ public class Message implements Comparable {
public int ReplyTo = 0;
private String Text = null;
private User User = null;
+ @JsonProperty("tags")
public List<Tag> Tags = new ArrayList<>();
private Date date;
public int TimeAgo = 0;
@@ -157,7 +160,7 @@ public class Message implements Comparable {
return null;
}
}
-
+ @JsonIgnore
public String getTagsString() {
String ret = "";
if (!Tags.isEmpty()) {
@@ -209,6 +212,7 @@ public class Message implements Comparable {
User = user;
}
+ @JsonProperty("body")
public String getText() {
return Text;
}
@@ -217,6 +221,8 @@ public class Message implements Comparable {
Text = text;
}
+ @JsonProperty("timestamp")
+ @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss", timezone="UTC")
public Date getDate() {
return date;
}