Mercurial > prosody-modules
comparison mod_manifesto/mod_manifesto.lua @ 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 | e36f82d7baae |
children | 99748c89edd4 |
comparison
equal
deleted
inserted
replaced
1285:f1a0a0754b87 | 1286:9700c89f7bf6 |
---|---|
54 return | 54 return |
55 end | 55 end |
56 | 56 |
57 timer.add_task(15, function () | 57 timer.add_task(15, function () |
58 local bad_contacts, bad_hosts = {}, {}; | 58 local bad_contacts, bad_hosts = {}, {}; |
59 for contact_jid, item in pairs(session.roster) do | 59 for contact_jid, item in pairs(session.roster or {}) do |
60 local _, contact_host = jid_split(contact_jid); | 60 local _, contact_host = jid_split(contact_jid); |
61 local bad = false; | 61 local bad = false; |
62 local remote_host_session = host_session.s2sout[contact_host]; | 62 local remote_host_session = host_session.s2sout[contact_host]; |
63 if remote_host_session and remote_host_session.type == "s2sout" then -- Only check remote hosts we have completed s2s connections to | 63 if remote_host_session and remote_host_session.type == "s2sout" then -- Only check remote hosts we have completed s2s connections to |
64 if not remote_host_session.secure then | 64 if not remote_host_session.secure then |