diff plugins/mod_presence.lua @ 7780:dbd202e7c587

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 10 Dec 2016 02:55:38 +0100
parents b1f80447a2b1
children c3790ca4144f
line wrap: on
line diff
--- a/plugins/mod_presence.lua	Mon Dec 05 23:03:09 2016 +0100
+++ b/plugins/mod_presence.lua	Sat Dec 10 02:55:38 2016 +0100
@@ -178,7 +178,9 @@
 		end
 		core_post_stanza(origin, stanza);
 		send_presence_of_available_resources(node, host, to_bare, origin);
-		core_post_stanza(origin, st.presence({ type = "probe", from = from_bare, to = to_bare }));
+		if rostermanager.is_user_subscribed(node, host, to_bare) then
+			core_post_stanza(origin, st.presence({ type = "probe", from = from_bare, to = to_bare }));
+		end
 	elseif stanza.attr.type == "unsubscribed" then
 		-- 1. send unavailable
 		-- 2. route stanza