mod_presence: Don't stop pre-event for outgoing probes.
authorWaqas Hussain <waqas20@gmail.com>
Fri, 4 Jun 2010 13:30:18 +0000 (18:30 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Fri, 4 Jun 2010 13:30:18 +0000 (18:30 +0500)
plugins/mod_presence.lua

index a74e24c33000438ae7af656c9a8a1f93b3670e9c..509d5862d6cc85929b0f848db3e19cb0401b390f 100644 (file)
@@ -187,7 +187,10 @@ function handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_
        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