Pregunta

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

¿Fue útil?

Solución

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top