Possible Subscription Status Bug

  1. UserA and UserB are subscribed to each other (sub=both)

  2. UserA unsubscribes to UserB while UserB is offline (by sending presence type=“unsubscribe”, NOT by calling Roster#removeEntry

In my RosterListener’s entriesUpdated callback, I am expecting

RosterPacket.ItemStatus.UNSUBSCRIPTION_PENDING.equals(entry.getStatus()))

to be true (where entry = the RosterEntry representing UserB), however in this case, getStatus() always returns SUBSCRIPTION_PENDING.

In my application, if a user adds an offline user to his roster, I want to show it on the roster, and if he deletes an offline user to his roster, I want to remove it from the roster. I am filtering out sub types from and none, so they are not displayed. The one exception is if the user adds an offline user, the new contact’s sub type is none, but he should be shown (I determine this by checking if getStatus = SUBSCRIPTION_PENDING).

When a user removes an offline user, I want that roster entry to be immediately removed, but getType() and getStatus() return the same values as if I just added him (none and SUBSCRIPTION_PENDING respectively).

Does getStatus() EVER return UNSUBSCRIPTION_PENDING? In my experience so far, it does not.

Can anybody offer any suggestions to help me out?

Thanks,

Richard