powered by Jive Software

Previously rejected/accepted subscriptions

Hello,

Is there a way to tell if a roster entry has previously been accepted or rejected? It seems possible to store a record of this event locally, but it is possible for my users to log in from multiple places, so I have to keep the roster synced across all locations.

For example, I log in to terminal A and reject a subscription request. It seems to still keep the entry in my roster. I then log in to terminal B. Because it is still in my roster, is there any way to tell that I had previously rejected it on terminal A?

Many thanks!

After a roster entry is accepted or rejected the record is expunged from the roster. If you would like to keep track of this on the server you could use something along the lines of private storage or pubsub to keep track of it.

Cheers,

Alex

Hi Alex,

Maybe this is something I’m doing wrong, but it seems like an entry is being added to the roster before I approve it. I am using setSubscriptionMode(Roster.SubscriptionMode.manual) and I have implemented a PacketTypeListener which listens for Presence.Type.subscribe. The subscription event is being caught, but my RosterListener is also catching an “entriesAdded” event for the requesting user.

My concern is that the entry is added to the roster at this point. Once someone logs into another terminal, the entry is on the roster and I’m not sure there is any way for them to tell that the other terminal which received the subscription event has not yet approved the roster entry. Do you know if this second terminal will also receive a subscription event? What happens if I somehow miss the subscription event on either terminal? I’m just wondering if there is any way to tell after catching that initial request.

Thanks!