Changeset

1176:06e0c279f6a8

mod_lastlog: Import util.datetime
author Kim Alvefur <zash@zash.se>
date Wed, 28 Aug 2013 19:21:00 +0200
parents 1175:9eac4e2386d2
children 1177:a464261deba8
files mod_lastlog/mod_lastlog.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_lastlog/mod_lastlog.lua	Wed Aug 28 19:19:58 2013 +0200
+++ b/mod_lastlog/mod_lastlog.lua	Wed Aug 28 19:21:00 2013 +0200
@@ -48,6 +48,7 @@
 	end);
 
 elseif module:get_option_boolean("lastlog_stamp_offline") then
+	local datetime = require"util.datetime".datetime;
 	local function offline_stamp(event)
 		local stanza = event.stanza;
 		local node, to_host = jid.split(stanza.attr.from);
@@ -58,7 +59,7 @@
 				stanza:tag("delay", {
 					xmlns = "urn:xmpp:delay",
 					from = host,
-					stamp = datetime.datetime(timestamp),
+					stamp = datetime(timestamp),
 				}):up();
 			end
 		end