# HG changeset patch # User JC Brand # Date 1489568010 0 # Node ID c4c51e43b7887370974bc9a5853600a3f59995aa # Parent 8b8cab2eb7fc831dd13d26b1fc466a9cfd8c7aa8 mod_http_roster_admin: No need to manually purge. mod_storage_memory now has the `auto_purge_enabled` option which does the job. diff -r 8b8cab2eb7fc -r c4c51e43b788 mod_http_roster_admin/mod_http_roster_admin.lua --- a/mod_http_roster_admin/mod_http_roster_admin.lua Tue Mar 14 17:46:51 2017 +0000 +++ b/mod_http_roster_admin/mod_http_roster_admin.lua Wed Mar 15 08:53:30 2017 +0000 @@ -294,15 +294,6 @@ return true; end -module:hook("resource-unbind", function (event) - local user_bare_jid = event.session.username.."@"..event.session.host; - if not bare_sessions[user_bare_jid] then -- User went offline - -- We don't need this user's info cached anymore, clear it. - module:log("debug", "Purging the roster for %s", user_bare_jid); - storagemanager.open(event.session.host, "roster", "keyval").store[event.session.username] = nil; - end -end); - module:provides("http", { route = { ["POST /refresh"] = handle_refresh_multi;