From 602fc790984e0c9fc1ffdd22d750d9d6d202bd0b 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(-) (limited to 'plugins') 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 From a73876f45b6503d8304d3a667c4508fcc4fb1f1c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 20 Aug 2016 17:30:16 +0200 Subject: mod_blocklist: Mention issue numbers --- plugins/mod_blocklist.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_blocklist.lua b/plugins/mod_blocklist.lua index f659a197..9083dda4 100644 --- a/plugins/mod_blocklist.lua +++ b/plugins/mod_blocklist.lua @@ -302,6 +302,7 @@ local prio_in, prio_out = 100, 100; module:hook("presence/bare", drop_stanza, prio_in); module:hook("presence/full", drop_stanza, prio_in); +-- FIXME See #690 module:hook("message/bare", bounce_message, prio_in); module:hook("message/full", bounce_message, prio_in); @@ -312,9 +313,9 @@ module:hook("pre-message/bare", bounce_outgoing, prio_out); module:hook("pre-message/full", bounce_outgoing, prio_out); module:hook("pre-message/host", bounce_outgoing, prio_out); --- Note: MUST bounce these, but we don't because this would produce --- lots of error replies due to server-generated presence. --- FIXME some day, likely needing changes to mod_presence +-- FIXME See #575 -- We MUST bounce these, but we don't because this +-- would produce lots of error replies due to server-generated presence. +-- This will likely need changes to mod_presence module:hook("pre-presence/bare", drop_outgoing, prio_out); module:hook("pre-presence/full", drop_outgoing, prio_out); module:hook("pre-presence/host", drop_outgoing, prio_out); -- cgit v1.2.3