Question

I am using a PacketListener to receive XMPP packets.

If I receive the following:

<presence from="jeanne@belle.com" to="betty@belle.com" type="subscribe"/>

is the XMPP server expecting me to respond immediately ?

  • Motivation: I want to cache all these subscription requests and allow the recipient to selectively ACCEPT/DENY (à la facebook invitations).
  • Is there an API in which I can request for all subscription requests from openfire ?
Was it helpful?

Solution

You do NOT need to reply immediately or even in a given session; the server stores the fact that you have a pending inbound subscription, and will re-inform you of the pending subscription every time you log in. Therefore, there should be no need to request the list either.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top