while debugging time stamps in chat room I found following bug:
xml parser skips all attributes from unknown entities.
for instance in this message
hey, I see that the hover over a room member list now shows the online names. Thx!
is “urn:xmpp:delay” wrongly interpreted. Stamp attribute is completely ignored. Maybe it can be fixed by my patch. But I didn’t test it at all. Second issue is, that “urn:xmpp:delay” should be officially supported, since it replaces older “jabber:x:delay”. Implementation is easy - just update DelayInformationProvider to support little bit different time format:
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSz"); formatter.setTimeZone(TimeZone.getTimeZone("GMT")); String stampString = parser.getAttributeValue("", "stamp"); String modifed = stampString.substring(0, stampString.length() - 6) + "GMT" + stampString.substring(stampString.length() - 6); stamp = formatter.parse(modifed);
smack.patch (1216 Bytes)