# HG changeset patch # User Kim Alvefur # Date 1541619021 -3600 # Node ID 1dfcea523200447b0e8a4fa67cb83274ea06c763 # Parent 3e44b8dc2cc0ca96f183d26476f7e7f2ef90a900 mod_storage_memory: Support the purge driver method diff -r 3e44b8dc2cc0 -r 1dfcea523200 plugins/mod_storage_memory.lua --- 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;