aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_presence.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-04-21 20:52:11 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-04-21 20:52:11 +0500
commitea626fdf640fbe4867d887bb34581e504c1cd0f3 (patch)
tree6d9def3b3d4ad5062ad905cdc1ff0ed9cf4b9f6f /plugins/mod_presence.lua
parent05e48b9fa681a98d6d9eb7acef86a60e28301b8f (diff)
downloadprosody-ea626fdf640fbe4867d887bb34581e504c1cd0f3.tar.gz
prosody-ea626fdf640fbe4867d887bb34581e504c1cd0f3.zip
mod_presence: Fix incorrect internal routing for probes and subscriptions
Diffstat (limited to 'plugins/mod_presence.lua')
-rw-r--r--plugins/mod_presence.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index 7b521c50..8ebe3de5 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -41,6 +41,7 @@ function handle_presence(origin, stanza, from_bare, to_bare, core_route_stanza,
end
function handle_normal_presence(origin, stanza, core_route_stanza)
+ error("hello world")
if origin.roster then
for jid in pairs(origin.roster) do -- broadcast to all interested contacts
local subscription = origin.roster[jid].subscription;
@@ -240,7 +241,7 @@ local function presence_handler(data)
origin.directed = origin.directed or {};
origin.directed[to] = true;
end
- if to == nil and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then
+ if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then
handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza);
elseif not to then
handle_normal_presence(origin, stanza, core_route_stanza);
@@ -248,7 +249,7 @@ local function presence_handler(data)
core_route_stanza(origin, stanza);
end
elseif (origin.type == "s2sin" or origin.type == "component") and hosts[host] then
- if to == nil and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then
+ if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then
handle_inbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza);
else
core_route_stanza(origin, stanza);