Software /
code /
prosody-modules
Comparison
mod_storage_gdbm/mod_storage_gdbm.lua @ 1753:54c8a0cb2996
mod_storage_(archive-capable): Change order of arguments to :append to be the same as return values from :find iterator (see prosody 41725f3df3cc)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 19 May 2015 18:34:08 +0200 |
parent | 1653:1fe899527ee5 |
child | 1754:c04d10557bbc |
comparison
equal
deleted
inserted
replaced
1752:3f3689a16133 | 1753:54c8a0cb2996 |
---|---|
71 local archive_mt = { __index = archive, suffix = ".adb" }; | 71 local archive_mt = { __index = archive, suffix = ".adb" }; |
72 | 72 |
73 archive.get = keyval.get; | 73 archive.get = keyval.get; |
74 archive.set = keyval.set; | 74 archive.set = keyval.set; |
75 | 75 |
76 function archive:append(username, key, when, with, value) | 76 function archive:append(username, key, value, when, with) |
77 if type(when) ~= "number" then | |
78 value, when, with = when, with, value; | |
79 end | |
80 | |
77 key = key or uuid(); | 81 key = key or uuid(); |
78 local meta = self:get(username); | 82 local meta = self:get(username); |
79 if not meta then | 83 if not meta then |
80 meta = {}; | 84 meta = {}; |
81 end | 85 end |