Software /
code /
prosody
Changeset
9783:4c91afc43639
mod_storage_memory: Implement :user iteration API
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 14 Jan 2019 00:17:02 +0100 |
parents | 9782:d844e197eedf |
children | 9784:7fa273f8869e |
files | plugins/mod_storage_memory.lua |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_storage_memory.lua Thu Jan 10 15:25:38 2019 +0100 +++ b/plugins/mod_storage_memory.lua Mon Jan 14 00:17:02 2019 +0100 @@ -22,6 +22,10 @@ return true; end +local function _users(self) + return next, self.store, nil; +end + local keyval_store = {}; keyval_store.__index = keyval_store; @@ -39,9 +43,13 @@ 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);