From bed081dc6390a0469a83f9e5c78433ad56fc9c6c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 9 Oct 2017 00:05:18 +0200 Subject: mod_pep_plus: Skip over roster metadata (version, pending) entry --- plugins/mod_pep_plus.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins/mod_pep_plus.lua') diff --git a/plugins/mod_pep_plus.lua b/plugins/mod_pep_plus.lua index b9ff3098..132482d8 100644 --- a/plugins/mod_pep_plus.lua +++ b/plugins/mod_pep_plus.lua @@ -348,9 +348,11 @@ module:hook("iq-result/bare/disco", function(event) hash_map[ver] = notify; -- update hash map if is_self then for jid, item in pairs(origin.roster) do -- for all interested contacts - if item.subscription == "both" or item.subscription == "from" then - if not recipients[jid] then recipients[jid] = {}; end - update_subscriptions(contact, jid, notify); + if jid then + if item.subscription == "both" or item.subscription == "from" then + if not recipients[jid] then recipients[jid] = {}; end + update_subscriptions(contact, jid, notify); + end end end end -- cgit v1.2.3