Question

USER A -> send subscribe USER B -> receive subscribe

I have two users in a chat, when user A sends a subcripcion user B, if this is connected to receive the notification (presence of subscribe), but if the user B is offline when is connected does not receive the notification.

How I can do for the user B receives notification when first connected?

I send the initial presence , but this does not send information subscribe

Was it helpful?

Solution

For subscriptions, when a users receives the request, an authorization must must sent. See http://xmpp.org/rfcs/rfc3921.html#sub. Until the subscription shows "both" in the status, presence notifications won't be sent.

  1. USER A > subscribe to USER B
  2. USER B > authorize USER A and subscribe to USER A
  3. USER A > authorize USER B
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top