diff options
author | Kim Alvefur <zash@zash.se> | 2018-11-07 20:30:21 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-11-07 20:30:21 +0100 |
commit | 88b509b8350eb652110fe5ebc1f2ff55c3f567a4 (patch) | |
tree | 7f6684515718e0a79a132318da527041c442141c /plugins/mod_storage_memory.lua | |
parent | ae95505bb95fa6dda89a58e8c0660b2001e83c15 (diff) | |
download | prosody-88b509b8350eb652110fe5ebc1f2ff55c3f567a4.tar.gz prosody-88b509b8350eb652110fe5ebc1f2ff55c3f567a4.zip |
mod_storage_memory: Support the purge driver method
Diffstat (limited to 'plugins/mod_storage_memory.lua')
-rw-r--r-- | plugins/mod_storage_memory.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_storage_memory.lua b/plugins/mod_storage_memory.lua index 9659f9e7..ed04a5fb 100644 --- a/plugins/mod_storage_memory.lua +++ b/plugins/mod_storage_memory.lua @@ -197,6 +197,12 @@ function driver:open(store, typ) -- luacheck: ignore 212/self return nil, "unsupported-store"; end +function driver:purge(user) -- luacheck: ignore 212/self + for _, store in pairs(memory) do + store[user] = nil; + end +end + if auto_purge_enabled then module:hook("resource-unbind", function (event) local user_bare_jid = event.session.username.."@"..event.session.host; |