Software /
code /
prosody
Changeset
9609:1dfcea523200 0.11
mod_storage_memory: Support the purge driver method
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 07 Nov 2018 20:30:21 +0100 |
parents | 9608:3e44b8dc2cc0 |
children | 9610:ca000dcd4c06 9611:2700317f93e4 |
files | plugins/mod_storage_memory.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_storage_memory.lua Wed Nov 07 17:49:34 2018 +0100 +++ b/plugins/mod_storage_memory.lua Wed Nov 07 20:30:21 2018 +0100 @@ -197,6 +197,12 @@ 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;