Diff

plugins/mod_pep_plus.lua @ 8304:9f8476c77fa8

mod_pep_plus: Skip over roster metadata (version, pending) entry
author Kim Alvefur <zash@zash.se>
date Mon, 09 Oct 2017 00:05:18 +0200
parent 8303:053cf683c2c7
child 8305:ec605946e597
line wrap: on
line diff
--- a/plugins/mod_pep_plus.lua	Sun Oct 08 23:42:55 2017 +0200
+++ b/plugins/mod_pep_plus.lua	Mon Oct 09 00:05:18 2017 +0200
@@ -348,9 +348,11 @@
 	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