Changeset

2621:c4c51e43b788

mod_http_roster_admin: No need to manually purge. mod_storage_memory now has the `auto_purge_enabled` option which does the job.
author JC Brand <jc@opkode.com>
date Wed, 15 Mar 2017 08:53:30 +0000
parents 2620:8b8cab2eb7fc
children 2622:ac3ca6233ded
files mod_http_roster_admin/mod_http_roster_admin.lua
diffstat 1 files changed, 0 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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;