aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-07 10:55:54 +0300
committerGravatar Vitaly Takmazov2016-07-07 10:55:54 +0300
commit857a930d31c425185c9b9405f5a7820e6cec9491 (patch)
treead35aafab5a1140e99ebd22a571dee15f9d48585 /src
parent058c77d435985cf177efd094816d01cf887d46f2 (diff)
fix ts parsing
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/juick/xmpp/extensions/JuickMessage.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/juick/xmpp/extensions/JuickMessage.java b/src/main/java/com/juick/xmpp/extensions/JuickMessage.java
index 220caba7..885b2375 100644
--- a/src/main/java/com/juick/xmpp/extensions/JuickMessage.java
+++ b/src/main/java/com/juick/xmpp/extensions/JuickMessage.java
@@ -81,7 +81,10 @@ public class JuickMessage extends com.juick.Message implements StanzaChild {
if (sReadOnly != null) {
jmsg.ReadOnly = true;
}
- jmsg.setDate(df.parse(parser.getAttributeValue(null, "ts")));
+ String ts = parser.getAttributeValue(null, "timestamp");
+ if (ts != null) {
+ jmsg.setDate(df.parse(ts));
+ }
jmsg.AttachmentType = parser.getAttributeValue(null, "attach");
while (parser.next() == XmlPullParser.START_TAG) {