powered by Jive Software

Blocking buddy or updating subscription type

hi all,

I dunno whether this is a openfire problem or not but I can not block buddies.(we use openfire 3.5.2)

here is the situation: our system has another buddying logic and we’re moving our chat system from a specific implementation to openfire. So I need to keep two db tables consistent. I need to use openfire caching bcuz we have more than 1 million users., so I can not do db insertions.

Instead of this, I implemented a java software which runs on the server side, connects on behalf of users and makes them buddies (the client application does not care for buddying at all, chat is just a small component).

But I could not impelement blocking!

I tried using privacy list, but it does not work! It sends the list, I can see in jivePrivacyList table, but nothing changes in jiveRoster (nor in the behaviour of openfire)!

What I want is to change subscription type. (from-to-both). I also tried extending Packet class and sending status information, but it did not work (i dunno why, server returns result, but nothing change, so I can not decrease a subscriptions ‘both’ field to ‘from’ or ‘to’.

help please, I’m runnin crazy for 2 days dealing with this!

here is the db query result for select * from jivePrivacyList;

sd-501620-v4lez4 | blockeds | 1 | <list xmlns=“jabber:iq:privacy” name=“blockeds”><item action=“deny” order=“1” type=“jid” value=“sd-501619-v4lez3@MY_DOMAIN”/><item action=“deny” order=“2” type=“jid” value=“sd-501627-v4lez11@MY_DOMAIN”><presence-out/></item><item action=“deny” order=“3” type=“jid” value=“sd-501623-v4lez7@MY_DOMAIN”/></list> |

and the other try, the class that extends Packet:

public class BlockPacket extends Packet {

User me;

User other;

public BlockPacket(User me, User other) {

this.me = me;

this.other = other;



public String toXML() {

// TODO Auto-generated method stub

String ret = “<iq from=’” + me.username + “’ type=‘set’ id='block_” + Packet.nextID() + “’>”+

“<query xmlns=‘jabber:iq:roster’>”+

“<item jid=’” + other.username + “’ name=’” + other.username + “’ subscription=‘to’/>”+


Logger.log(“cagrildim!:” + ret);

return ret;



Additional information:

When I send

<iq from=‘sd-501620-v4lez4@MYDOMAIN/server6565c878’ type=‘set’ id=‘block_jLapN-4’><query xmlns=‘jabber:iq:roster’><item jid=‘sd-501621-v4lez5@MYDOMAIN’ name=‘sd-501621-v4lez5@MYDOMAIN’ subscription=‘to’/></query></iq>

I get the following responses(in order):

<iq id=“270-300” to=“sd-501620-v4lez4@MYDOMAIN/server6565c878” type=“set”><query xmlns=“jabber:iq:roster”><item jid=“sd-501621-v4lez5@MYDOMAIN” name=“sd-501621-v4lez5@MYDOMAIN” subscription=“both”></item></query></iq>

<iq id=“block_jLapN-4” to=“sd-501620-v4lez4@MYDOMAIN/server6565c878” type=“result”></iq>

Did you activate your list on the client side?