plugins/mod_bookmarks.lua
changeset 12176 2515033c2a74
parent 12175 b2923a3b4e02
child 12181 024cc878f472
equal deleted inserted replaced
12175:b2923a3b4e02 12176:2515033c2a74
   333 	local username = session.username;
   333 	local username = session.username;
   334 	local service = mod_pep.get_pep_service(username);
   334 	local service = mod_pep.get_pep_service(username);
   335 	local jid = username.."@"..session.host;
   335 	local jid = username.."@"..session.host;
   336 
   336 
   337 	local ok, ret = service:get_items(namespace_legacy, session.full_jid);
   337 	local ok, ret = service:get_items(namespace_legacy, session.full_jid);
   338 	if ok then
   338 	if ok and ret[1] then
   339 		module:log("debug", "Legacy PEP bookmarks found for %s, migrating.", jid);
   339 		module:log("debug", "Legacy PEP bookmarks found for %s, migrating.", jid);
   340 		local failed = false;
   340 		local failed = false;
   341 		for _, item_id in ipairs(ret) do
   341 		for _, item_id in ipairs(ret) do
   342 			local item = ret[item_id];
   342 			local item = ret[item_id];
   343 			if item.attr.id ~= "current" then
   343 			if item.attr.id ~= "current" then