[ejabberd] mod_blocking and mod_privacy

Badlop badlop at gmail.com
Mon Oct 10 14:34:36 MSD 2011

2011/10/7 Keewon Seo <oedalpha at gmail.com>:
> To use XEP-0191 feature, should I turn on both of mod_blocking and
> mod_privacy or just mod_blocking only?

Both of them must be enabled, as mentioned in the Guide.

> It seems that blocking works only if both of mod_blocking and mod_privacy
> are turned on.
> But result IQ doesn't fit to XEP-0191.

This seems a bug in ejabberd.
Try this simple patch, it seems to solve the problem to me:

--- a/src/mod_blocking.erl
+++ b/src/mod_blocking.erl
@@ -40,9 +40,9 @@
 start(Host, Opts) ->
     IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
     ejabberd_hooks:add(privacy_iq_get, Host,
-                      ?MODULE, process_iq_get, 40),
+                      ?MODULE, process_iq_get, 60),
     ejabberd_hooks:add(privacy_iq_set, Host,
-                      ?MODULE, process_iq_set, 40),
+                      ?MODULE, process_iq_set, 60),
     mod_disco:register_feature(Host, ?NS_BLOCKING),
     gen_iq_handler:add_iq_handler(ejabberd_sm, Host, ?NS_BLOCKING,
                                  ?MODULE, process_iq, IQDisc).


More information about the ejabberd mailing list