Software /
code /
prosody-modules
Comparison
mod_storage_muc_log/mod_storage_muc_log.lua @ 1759:0aeab7234d5e
Fix for 54c8a0cb2996
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 21 May 2015 11:56:35 +0200 |
parent | 1753:54c8a0cb2996 |
child | 1760:e72f9eac51c8 |
comparison
equal
deleted
inserted
replaced
1758:7ba877e2d660 | 1759:0aeab7234d5e |
---|---|
48 return with and tag.name .. "<" .. with or tag.name; | 48 return with and tag.name .. "<" .. with or tag.name; |
49 end | 49 end |
50 | 50 |
51 function driver:append(node, key, stanza, when, with) | 51 function driver:append(node, key, stanza, when, with) |
52 if type(when) ~= "number" then | 52 if type(when) ~= "number" then |
53 value, when, with = when, with, value; | 53 stanza, when, with = when, with, stanza; |
54 end | 54 end |
55 local today = os_date(datef, when); | 55 local today = os_date(datef, when); |
56 local now = os_date(timef, when); | 56 local now = os_date(timef, when); |
57 local data = data_load(node, host, datastore .. "/" .. today) or {}; | 57 local data = data_load(node, host, datastore .. "/" .. today) or {}; |
58 data[#data + 1] = "<stanza time=\"".. now .. "\">" .. tostring(stanza) .. "</stanza>\n"; | 58 data[#data + 1] = "<stanza time=\"".. now .. "\">" .. tostring(stanza) .. "</stanza>\n"; |