Software /
code /
prosody
Diff
plugins/mod_blocklist.lua @ 7620:c27c9695d130
mod_blocklist: Decrease priority of iq hooks to ease handling by other modules
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 20 Aug 2016 17:24:08 +0200 |
parent | 7079:f094683ae6eb |
child | 7621:b8c03df6e8ca |
line wrap: on
line diff
--- 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)