aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-06-02 15:53:04 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-06-02 15:53:04 +0500
commit462c308e8dd05f106f4abd72d06cb501814cab62 (patch)
tree9212b6d6eff21f000ec3e75173a9ead1c358f126
parent2b3431a779d6c4140492d1d3988645f8a0e9ade9 (diff)
downloadprosody-462c308e8dd05f106f4abd72d06cb501814cab62.tar.gz
prosody-462c308e8dd05f106f4abd72d06cb501814cab62.zip
mod_presence: Handle all outbound presence stanzas
-rw-r--r--plugins/mod_presence.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index ea6a61fc..e59b5c6e 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -272,7 +272,7 @@ module.unload = function()
prosody.events.remove_handler(module:get_host().."/presence", presence_handler);
end
-module:hook("pre-presence/full", function(data)
+local outbound_presence_handler = function(data)
-- outbound presence to full JID recieved
local origin, stanza = data.origin, data.stanza;
@@ -292,4 +292,8 @@ module:hook("pre-presence/full", function(data)
origin.directed[to] = true; -- FIXME does it make more sense to add to_bare rather than to?
end
end
-end);
+end
+
+module:hook("pre-presence/full", outbound_presence_handler);
+module:hook("pre-presence/bare", outbound_presence_handler);
+module:hook("pre-presence/host", outbound_presence_handler);