diff options
author | Vitaly Takmazov | 2016-06-30 12:06:48 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-06-30 12:06:48 +0300 |
commit | fb4aa5389924cb11fa8bf6489baf29ca8d7a6814 (patch) | |
tree | ad25ae0bdc802bc717c4c02b8e75baaacea8037f | |
parent | e3fdbbcd833e4be70b4e62e541cfd03b2f4d129a (diff) |
fix parsing date
-rw-r--r-- | src/main/java/com/juick/xmpp/extensions/JuickMessage.java | 5 |
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) { |