Roster and Presence problem

What I want is :

A add B as roster then B in A’s roster list but A not unless B add A,too.

A add B as roster then A subsribe B’s presence but B not unless B add A,too.

A delete B from roster then B is removed from A’s roster list and A unsubscribe B’s presence.At the sametime if A,B are roster each other,then A still B’s roster and B still subscribe A’s presence unless B delete A,too.

And an addition option could add when A delete B from its roster list is that if he want to be deleted from B’s roster list if it already was.

I think this should be the regular process for roster management.Why the xmpp foundation didnot define the protocol like this or the openfire/spark implemention is wrong?

Where to change if I want to modify the behavior to be what I desc above?


This is quite hard to understand all this “A and B” stuff you have put there. I suppose you want to suppress the subscription requests in some cases? Then maybe you should try Subscription plugin for Openfire.

I think xmpp had implemented this thing this way because it cares for people privacy. So if you remove someonw from your roster, then most probably you don’t want them to still see your presence. I think this is an understandable reason. At least in general cases, though this can be different in the corporate environment.