From 2a5285e1ac7234737a9bee60e4c0f890f00d7a21 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 20 Aug 2016 17:24:08 +0200 Subject: mod_blocklist: Decrease priority of iq hooks to ease handling by other modules --- plugins/mod_blocklist.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/mod_blocklist.lua b/plugins/mod_blocklist.lua index 8efbfd96..f659a197 100644 --- a/plugins/mod_blocklist.lua +++ b/plugins/mod_blocklist.lua @@ -113,7 +113,7 @@ module:hook("iq-get/self/urn:xmpp:blocking:blocklist", function (event) origin.interested_blocklist = true; -- Gets notified about changes origin.send(reply); return true; -end); +end, -1); -- Add or remove some jid(s) from the blocklist -- We want this to be atomic and not do a partial update @@ -215,8 +215,8 @@ local function edit_blocklist(event) return true; end -module:hook("iq-set/self/urn:xmpp:blocking:block", edit_blocklist); -module:hook("iq-set/self/urn:xmpp:blocking:unblock", edit_blocklist); +module:hook("iq-set/self/urn:xmpp:blocking:block", edit_blocklist, -1); +module:hook("iq-set/self/urn:xmpp:blocking:unblock", edit_blocklist, -1); -- Cache invalidation, solved! module:hook_global("user-deleted", function (event) -- cgit v1.2.3