문제

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

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top