powered by Jive Software

How do I know the list of users who have requested to be connected to you?

Hi,

I need to handle the list of users who have requested to be connected to you. Right now I am listening to the PresenceEvent.Presence, and updating a custom ArrayCollection with the Presence items of the PresenceEvent where type is “subscribed”. But I find weird that XIFF doesn’t have already an ArrayCollection somewhere with this list of users.

Checking the XMPPConnection class, I found that there is a PresenceQueue property that has a list of Presences. But it’s marked has private, and checking the code it seems it only holds the presences for a short period of time, so it’s not what I need.

Is there a straightforward way to access the list of users who have requested to be connected to you?

Thank you,

João Saleiro

After connection made initially to the server, and setting up your roster, you should listen to all events from roster and there you will then receive any request waiting for your approval.