Closed hackrole closed 8 years ago
sorry for that, it seems I send error iq .
seems it really not work. I send xmpp privacy ok and get the result ok
DEBUG:sleekxmpp.xmlstream.xmlstream:SEND:
<iq type="set" from="admin@localhost" id="0">
<query xmlns="jabber:iq:privacy">
<list name="black">
<item action="deny" type="jid" order="1" value="183@localhost">
<iq />
<message />
</item>
<item action="deny" type="jid" order="1" value="18344@localhost">
<iq />
<message />
</item>
<item action="deny" type="jid" order="1" value="18224@localhost">
<iq />
<message />
</item>
</list>
</query>
</iq>
DEBUG:sleekxmpp.xmlstream.xmlstream:RECV:
<iq to="admin@localhost/bot" from="admin@localhost" id="push2453788533" type="set">
<query xmlns="jabber:iq:privacy">
<list name="black" />
</query>
</iq>
DEBUG:sleekxmpp.xmlstream.xmlstream:SEND:
<iq type="get" id="342e07e1-891e-4696-93b5-3d14865ff6b4-16">
<query xmlns="jabber:iq:privacy">
<list name="black" />
</query>
</iq>
DEBUG:sleekxmpp.xmlstream.xmlstream:RECV:
<iq to="admin@localhost/bot" from="admin@localhost" id="342e07e1-891e-4696-93b5-3d14865ff6b4-16" type="result">
<query xmlns="jabber:iq:privacy">
<list name="black">
<item action="deny" type="jid" order="1" value="18224@localhost">
<message />
<iq />
</item>
<item action="deny" type="jid" order="1" value="18344@localhost">
<message />
<iq />
</item>
<item action="deny" type="jid" order="1" value="183@localhost">
<message />
<iq />
</item>
</list>
</query>
</iq>
but when send message from 183@localhost, the client does got any errors.
You must also set that list as active, by sending something like this:
<iq from='admin@localhost/bot' type='set' id='active1'>
<query xmlns='jabber:iq:privacy'>
<active name='black'/>
</query>
</iq>
See http://xmpp.org/extensions/xep-0016.html#protocol-active
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I try to block other user's message but it seems not work. first I send xmpp privcy stanze like this.
and then use the 183@localhost to send a message to the admin@localhost, the client not got any error.