I am using the denySubscription() method on the Roster class after another user has sent a reqestSubscription(). The weird thing is, after the denySubscription() has been invoked, the Roster list for both users contains an entry with the other user. I would have thought that when a denySubscription() was called that would remove the entries from both Roster lists. I am having to call removeContact() to actually get the users of the roster lists. Am I missing something or is this expected behaviour?
Regardless of whether it’s intended or not (I don’t recall), it’s pretty unintuitive. I’ll add it to my list.
Actually, thinking about it, I’m not sure that removing the contact is the correct behavior. One way subscriptions are valid in XMPP.
Thanks for the response David.
So once rejected should the contacts be in both Roster’s or just the one that sent the invite?
Either way, I can deel with the behaviour programmatically, so I guess it’s not such a big deal.
It depends on how it happened. If you have:
User A is subscribed to User B
User B attempts to subscribe to User A
User A denies the subscription
Then I believe the result would be that A and B would both be on each other’s lists, with a one way subscription.