changeset 1286:9700c89f7bf6

mod_manifesto: Fix traceback when user doesn't have a roster (?)
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Jan 2014 20:27:14 +0000
parents f1a0a0754b87
children da2e593317d7
files mod_manifesto/mod_manifesto.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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];