plugins/mod_presence.lua
changeset 7782 b1f80447a2b1
parent 7473 893378a1c03e
parent 7781 62e7d6a73c72
child 8074 c3790ca4144f
--- a/plugins/mod_presence.lua	Thu Dec 08 17:51:23 2016 +0100
+++ b/plugins/mod_presence.lua	Fri Dec 09 17:07:57 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