comparison mod_storage_muc_log/mod_storage_muc_log.lua @ 1760:e72f9eac51c8

mod_storage_(various): Order swapping in 54c8a0cb2996 was backwards
author Kim Alvefur <zash@zash.se>
date Thu, 21 May 2015 12:09:47 +0200
parents 0aeab7234d5e
children 49a01b78b45f
comparison
equal deleted inserted replaced
1759:0aeab7234d5e 1760:e72f9eac51c8
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 stanza, when, with = when, with, stanza; 53 when, with, stanza = stanza, when, with;
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";