aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-01-14 00:17:02 +0100
committerKim Alvefur <zash@zash.se>2019-01-14 00:17:02 +0100
commitb6cff0ba5e41f9be9232b37461df5ff11cacfa6e (patch)
tree28319200353784d525d8bbbb20a8a34d82fbb24f /plugins
parentmod_muc_mam: Copy cleanup mechanism from mod_mam (fixes #672) (diff)
downloadprosody-b6cff0ba5e41f9be9232b37461df5ff11cacfa6e.tar.xz
prosody-b6cff0ba5e41f9be9232b37461df5ff11cacfa6e.zip
mod_storage_memory: Implement :user iteration API
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_storage_memory.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/mod_storage_memory.lua b/plugins/mod_storage_memory.lua
index 71205ee02..745e394ba 100644
--- a/plugins/mod_storage_memory.lua
+++ b/plugins/mod_storage_memory.lua
@@ -23,6 +23,10 @@ local function _purge_store(self, username)
return true;
end
+local function _users(self)
+ return next, self.store, nil;
+end
+
local keyval_store = {};
keyval_store.__index = keyval_store;
@@ -40,9 +44,13 @@ end
keyval_store.purge = _purge_store;
+keyval_store.users = _users;
+
local archive_store = {};
archive_store.__index = archive_store;
+archive_store.users = _users;
+
function archive_store:append(username, key, value, when, with)
if is_stanza(value) then
value = st.preserialize(value);