mod_presence: Don't stop pre-event for outgoing probes.

Fri, 04 Jun 2010 18:30:18 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 04 Jun 2010 18:30:18 +0500
changeset 3182
a19dbb6446a0
parent 3181
1f73b3a960cf
child 3183
28a5c0bda928

mod_presence: Don't stop pre-event for outgoing probes.

plugins/mod_presence.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_presence.lua	Fri Jun 04 18:24:09 2010 +0500
+++ b/plugins/mod_presence.lua	Fri Jun 04 18:30:18 2010 +0500
@@ -187,7 +187,10 @@
 	local st_from, st_to = stanza.attr.from, stanza.attr.to;
 	stanza.attr.from, stanza.attr.to = from_bare, to_bare;
 	log("debug", "outbound presence "..stanza.attr.type.." from "..from_bare.." for "..to_bare);
-	if stanza.attr.type == "subscribe" then
+	if stanza.attr.type == "probe" then
+		stanza.attr.from, stanza.attr.to = st_from, st_to;
+		return;
+	elseif stanza.attr.type == "subscribe" then
 		-- 1. route stanza
 		-- 2. roster push (subscription = none, ask = subscribe)
 		if rostermanager.set_contact_pending_out(node, host, to_bare) then

mercurial