aboutsummaryrefslogtreecommitdiff
path: root/juick-core/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-core/src/main/java')
-rw-r--r--juick-core/src/main/java/com/juick/json/MessageSerializer.java6
-rw-r--r--juick-core/src/main/java/com/juick/xmpp/extensions/JuickMessage.java2
2 files changed, 6 insertions, 2 deletions
diff --git a/juick-core/src/main/java/com/juick/json/MessageSerializer.java b/juick-core/src/main/java/com/juick/json/MessageSerializer.java
index e8402d51..4238df60 100644
--- a/juick-core/src/main/java/com/juick/json/MessageSerializer.java
+++ b/juick-core/src/main/java/com/juick/json/MessageSerializer.java
@@ -39,7 +39,7 @@ public class MessageSerializer extends JSONSerializer<Message> {
UserSerializer userSerializer = new UserSerializer();
PlaceSerializer placeSerializer = new PlaceSerializer();
- final SimpleDateFormat df;
+ private final SimpleDateFormat df;
public MessageSerializer() {
df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -135,4 +135,8 @@ public class MessageSerializer extends JSONSerializer<Message> {
return json;
}
+
+ public SimpleDateFormat getDf() {
+ return df;
+ }
}
diff --git a/juick-core/src/main/java/com/juick/xmpp/extensions/JuickMessage.java b/juick-core/src/main/java/com/juick/xmpp/extensions/JuickMessage.java
index 885b2375..510f7cc1 100644
--- a/juick-core/src/main/java/com/juick/xmpp/extensions/JuickMessage.java
+++ b/juick-core/src/main/java/com/juick/xmpp/extensions/JuickMessage.java
@@ -81,7 +81,7 @@ public class JuickMessage extends com.juick.Message implements StanzaChild {
if (sReadOnly != null) {
jmsg.ReadOnly = true;
}
- String ts = parser.getAttributeValue(null, "timestamp");
+ String ts = parser.getAttributeValue(null, "ts");
if (ts != null) {
jmsg.setDate(df.parse(ts));
}