diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-06-02 15:53:04 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-06-02 15:53:04 +0500 |
commit | 462c308e8dd05f106f4abd72d06cb501814cab62 (patch) | |
tree | 9212b6d6eff21f000ec3e75173a9ead1c358f126 /plugins | |
parent | 2b3431a779d6c4140492d1d3988645f8a0e9ade9 (diff) | |
download | prosody-462c308e8dd05f106f4abd72d06cb501814cab62.tar.gz prosody-462c308e8dd05f106f4abd72d06cb501814cab62.zip |
mod_presence: Handle all outbound presence stanzas
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_presence.lua | 8 |
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);
|