mod_manifesto: Fix traceback when user doesn't have a roster (?)
authorMatthew Wild <mwild1@gmail.com>
Thu, 23 Jan 2014 20:27:14 +0000
changeset 1286 9700c89f7bf6
parent 1285 f1a0a0754b87
child 1287 da2e593317d7
mod_manifesto: Fix traceback when user doesn't have a roster (?)
mod_manifesto/mod_manifesto.lua
--- a/mod_manifesto/mod_manifesto.lua	Thu Jan 23 21:02:38 2014 +0100
+++ b/mod_manifesto/mod_manifesto.lua	Thu Jan 23 20:27:14 2014 +0000
@@ -56,7 +56,7 @@
 
 	timer.add_task(15, function ()
 		local bad_contacts, bad_hosts = {}, {};
-		for contact_jid, item in pairs(session.roster) do
+		for contact_jid, item in pairs(session.roster or {}) do
 			local _, contact_host = jid_split(contact_jid);
 			local bad = false;
 			local remote_host_session = host_session.s2sout[contact_host];