# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1471706648 -7200
# Node ID c27c9695d1300510e1bd6f0302a24a6998128173
# Parent  5a09c1166d89d4ae3b3a9be943bbea12126199bf
mod_blocklist: Decrease priority of iq hooks to ease handling by other modules

diff -r 5a09c1166d89 -r c27c9695d130 plugins/mod_blocklist.lua
--- a/plugins/mod_blocklist.lua	Fri Aug 19 16:25:15 2016 +0200
+++ b/plugins/mod_blocklist.lua	Sat Aug 20 17:24:08 2016 +0200
@@ -113,7 +113,7 @@
 	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 @@
 	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)