aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);