aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_blocklist.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-20 17:24:08 +0200
committerKim Alvefur <zash@zash.se>2016-08-20 17:24:08 +0200
commit602fc790984e0c9fc1ffdd22d750d9d6d202bd0b (patch)
tree966dc62950dd79bbcbbfbafc5a9c8ee0d034ae57 /plugins/mod_blocklist.lua
parent75ff5d1a054175bf5dc659ceb0c6bc3f6f1a2525 (diff)
downloadprosody-602fc790984e0c9fc1ffdd22d750d9d6d202bd0b.tar.gz
prosody-602fc790984e0c9fc1ffdd22d750d9d6d202bd0b.zip
mod_blocklist: Decrease priority of iq hooks to ease handling by other modules
Diffstat (limited to 'plugins/mod_blocklist.lua')
-rw-r--r--plugins/mod_blocklist.lua6
1 files 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)