From 462c308e8dd05f106f4abd72d06cb501814cab62 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 2 Jun 2009 15:53:04 +0500 Subject: mod_presence: Handle all outbound presence stanzas --- plugins/mod_presence.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins') 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); -- cgit v1.2.3