[ejabberd] mod_blocking and mod_privacy

Keewon Seo oedalpha at gmail.com
Fri Oct 7 13:03:11 MSD 2011


Hello,

I've trouble with configuring mod_blocking and mod_privacy.

To use XEP-0191 feature, should I turn on both of mod_blocking and
mod_privacy or just mod_blocking only?

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.

Example)
SEND: <iq type="get" id="5">
  <blocklist xmlns="urn:xmpp:blocking" />
</iq>
RECEIVE: <iq from='test1 at localhost'
to='test1 at localhost/3725763436131797182689153'
id='5' type='result'>
  <query xmlns='jabber:iq:privacy'>
  <active name='Blocked contacts'/>
  <default name='Blocked contacts'/>
  <list name='Blocked contacts'/>
  </query>
  </iq>

SEND: <iq type="set" id="7">
  <unblock xmlns="urn:xmpp:blocking">
  <item jid="test2 at localhost" />
  </unblock>
  </iq>
RECEIVE: <iq from='test1 at localhost'
to='test1 at localhost/3725763436131797182689153'
id='push907039926' type='set'>
  <query xmlns='jabber:iq:privacy'>
  <list name='Blocked contacts'/>
  </query>
  </iq>
  <iq from='test1 at localhost' to='test1 at localhost/3725763436131797182689153'
id='push' type='set'>
  <unblock xmlns='urn:xmpp:blocking'>
  <item jid='test2 at localhost'/>
  </unblock>
  </iq>
  <iq from='test1 at localhost' to='test1 at localhost/3725763436131797182689153'
id='7' type='error'>
  <unblock xmlns='urn:xmpp:blocking'>
  <item jid='test2 at localhost'/>
  </unblock>
  <error code='400' type='modify'>
  <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
  </iq>


On the other hand, enabling mod_blocking only generates good iq result.
But blocking functionality doesn't work. (mod_blocking itself doesn't hook
privacy_get_user_list)

SEND: <iq type="get" id="5">
  <blocklist xmlns="urn:xmpp:blocking" />
  </iq>
RECEIVE: <iq from='test1 at localhost'
to='test1 at localhost/2882800012131797169759153'
id='5' type='result'>
  <blocklist xmlns='urn:xmpp:blocking'/>
  </iq>

SEND: <iq type="set" id="6">
  <block xmlns="urn:xmpp:blocking">
  <item jid="test2 at localhost" />
  </block>
  </iq>
RECEIVE: <iq from='test1 at localhost'
to='test1 at localhost/2882800012131797169759153'
id='push' type='set'>
  <block xmlns='urn:xmpp:blocking'>
  <item jid='test2 at localhost'/>
  </block>
  </iq>
  <iq from='test1 at localhost' to='test1 at localhost/2882800012131797169759153'
id='6' type='result'/>

If I've missed something, please let me know.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20111007/4f2b2b3f/attachment.html>


More information about the ejabberd mailing list