aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pep_plus.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_pep_plus.lua')
-rw-r--r--plugins/mod_pep_plus.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/mod_pep_plus.lua b/plugins/mod_pep_plus.lua
index 52f6b66d..7d4064df 100644
--- a/plugins/mod_pep_plus.lua
+++ b/plugins/mod_pep_plus.lua
@@ -379,11 +379,12 @@ module:hook("iq-result/bare/disco", function(event)
end
hash_map[ver] = notify; -- update hash map
if is_self then
+ -- Optimization: Fiddle with other local users
for jid, item in pairs(origin.roster) do -- for all interested contacts
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);
+ local contact_node, contact_host = jid_split(jid);
+ if contact_host == host and item.subscription == "both" or item.subscription == "from" then
+ update_subscriptions(user_bare, contact_node, notify);
end
end
end