aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_presence.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_presence.lua')
-rw-r--r--plugins/mod_presence.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index d2dd2f51..ba71b940 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -267,10 +267,7 @@ local function presence_handler(data)
return true;
end
-local add_handler = require "core.eventmanager2".add_handler;
-local remove_handler = require "core.eventmanager2".remove_handler;
-
-add_handler(module:get_host().."/presence", presence_handler);
+prosody.events.add_handler(module:get_host().."/presence", presence_handler);
module.unload = function()
- remove_handler(module:get_host().."/presence", presence_handler);
+ prosody.events.remove_handler(module:get_host().."/presence", presence_handler);
end