kunal saxena
kunal saxena

Reputation: 414

Blocking user using privacy list in ejabberd returns "not-well-formed"

I want to block other user in ejabberd on basis of jid. I am trying to send iq stanza through send_stanza_c2s command. Like :-

send_stanza_c2s admin localhost Smack "<iq from='admin@localhost/Smack' type='set' id='msg1'><query xmlns="jabber:iq:privacy"><list name="blocked"><item type="jid" value="jack10@localhost" action="deny" order="3"/><message/></item></list></query></iq>"

But it is giving me error.

Error: {4,<<"not well-formed (invalid token)">>}

Please help me with this.

Also guide me on if blocking user is achievable only through privacy lists (XEP-0016).

Upvotes: 1

Views: 441

Answers (1)

Flow
Flow

Reputation: 24083

The IQ request stanza you send to the server is not well formed, I.e. invalid. If you used Smack's API for privacy lists then you should report this as bug.

Upvotes: 1

Related Questions