aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-06-30 12:06:48 +0300
committerGravatar Vitaly Takmazov2016-06-30 12:06:48 +0300
commitfb4aa5389924cb11fa8bf6489baf29ca8d7a6814 (patch)
treead25ae0bdc802bc717c4c02b8e75baaacea8037f /src
parente3fdbbcd833e4be70b4e62e541cfd03b2f4d129a (diff)
fix parsing date
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 a7fd1e35..ac45f3d2 100644
--- a/src/main/java/com/juick/xmpp/extensions/JuickMessage.java
+++ b/src/main/java/com/juick/xmpp/extensions/JuickMessage.java
@@ -83,7 +83,10 @@ public class JuickMessage extends com.juick.Message implements StanzaChild {
jmsg.ReadOnly = true;
}
- jmsg.setDate(df.parse(parser.getAttributeValue(null, "ts")));
+ String timestampString = parser.getAttributeValue(null, "ts");
+ if (timestampString != null) {
+ jmsg.setDate(df.parse(timestampString));
+ }
jmsg.AttachmentType = parser.getAttributeValue(null, "attach");
while (parser.next() == XmlPullParser.START_TAG) {