Software /
code /
prosody
Comparison
plugins/mod_storage_memory.lua @ 9533:00a8e627854e
mod_storage_memory: Remove compat for very early argument order
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 21 Oct 2018 17:58:50 +0200 |
parent | 9468:bd5e4485a245 |
child | 9534:b301f7edf346 |
comparison
equal
deleted
inserted
replaced
9532:9bb33edd7255 | 9533:00a8e627854e |
---|---|
40 | 40 |
41 local archive_store = {}; | 41 local archive_store = {}; |
42 archive_store.__index = archive_store; | 42 archive_store.__index = archive_store; |
43 | 43 |
44 function archive_store:append(username, key, value, when, with) | 44 function archive_store:append(username, key, value, when, with) |
45 if type(when) ~= "number" then | |
46 when, with, value = value, when, with; | |
47 end | |
48 if is_stanza(value) then | 45 if is_stanza(value) then |
49 value = st.preserialize(value); | 46 value = st.preserialize(value); |
50 value = envload("return xml"..serialize(value), "=(stanza)", { xml = st.deserialize }) | 47 value = envload("return xml"..serialize(value), "=(stanza)", { xml = st.deserialize }) |
51 else | 48 else |
52 value = envload("return "..serialize(value), "=(data)", {}); | 49 value = envload("return "..serialize(value), "=(data)", {}); |