diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-04-23 02:48:22 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-04-23 02:48:22 +0500 |
commit | 2914bea9542be6de2abfa04a9f31f383ef7adf74 (patch) | |
tree | 65281f73942bae77a5896ba12929477cc4594463 | |
parent | df7b92f654d5abf200e586a10a30a943e64b1042 (diff) | |
download | prosody-2914bea9542be6de2abfa04a9f31f383ef7adf74.tar.gz prosody-2914bea9542be6de2abfa04a9f31f383ef7adf74.zip |
mod_presence: Fix for local presence subscriptions and probes
-rw-r--r-- | plugins/mod_presence.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua index 2e3c6b18..135d1c67 100644 --- a/plugins/mod_presence.lua +++ b/plugins/mod_presence.lua @@ -25,6 +25,20 @@ local rostermanager = require "core.rostermanager"; local sessionmanager = require "core.sessionmanager";
local offlinemanager = require "core.offlinemanager";
+local _core_route_stanza = core_route_stanza;
+local core_route_stanza;
+function core_route_stanza(origin, stanza)
+ if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then
+ local node, host = jid_split(stanza.attr.to);
+ host = hosts[host];
+ if host and host.type == "local" then
+ handle_inbound_presence_subscriptions_and_probes(origin, stanza, jid_bare(stanza.attr.from), jid_bare(stanza.attr.to), core_route_stanza);
+ return;
+ end
+ end
+ _core_route_stanza(origin, stanza);
+end
+
function handle_presence(origin, stanza, from_bare, to_bare, core_route_stanza, inbound)
local type = stanza.attr.type;
if type and type ~= "unavailable" and type ~= "error" then
|