Software /
code /
prosody
Changeset
9881:68faa0c1a99c 0.11
mod_storage_memory: Implement :user iteration API
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 14 Jan 2019 00:17:02 +0100 |
parents | 9880:78885b1bbb91 |
children | 9882:18f025b3987d 9931:485231f8b75d |
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 Fri Mar 22 17:40:07 2019 +0100 +++ b/plugins/mod_storage_memory.lua Mon Jan 14 00:17:02 2019 +0100 @@ -23,6 +23,10 @@ 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 @@ 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);