Software /
code /
verse
Changeset
297:447dffdaf46c
plugins.archive: Parse the timestamp
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 20 Apr 2012 04:12:49 +0200 |
parents | 296:78ddfd30c74e |
children | 298:1897dc6a07bb |
files | plugins/archive.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/archive.lua Fri Apr 20 04:10:18 2012 +0200 +++ b/plugins/archive.lua Fri Apr 20 04:12:49 2012 +0200 @@ -8,6 +8,7 @@ local xmlns_forward = "urn:xmpp:forward:0"; local xmlns_delay = "urn:xmpp:delay"; local uuid = require "util.uuid".generate; +local parse_datetime = require "util.datetime".parse; function verse.plugins.archive(stream) function stream:query_archive(where, query_params, callback) @@ -32,7 +33,7 @@ local id = result_tag.attr.id; local delay = forwarded:get_child("delay", xmlns_delay); - local stamp = delay and delay.attr.stamp or nil; + local stamp = delay and parse_datetime(delay.attr.stamp) or nil; local message = forwarded:get_child("message", "jabber:client")