Top

User presence and user login

Commentaires

1 commentaire

  • Olivier ANGUENOT

    Hi Pedro,

    No, there is no event when the user is logged-in but by default, he will send a "Online" or equivalent presence event that you will be able to handle. When he will log-out, you will be notified by an "offline" presence event.

    In order to receive events from others users, you need to invite them in your network. In order to do that, you have to call an API addToNetwork(contact):

    - If the user is in the same company, he will be automatically added to your network and you will be added to his network. So you will receive events from him and he will receive events from you

    - If the user is in an other company, he will add to accept or decline.

    Using admin account, you can automatically add a user to the network of an other user by calling the API joinContacts(). This can be done after user creation for example.

    The event is described here: https://hub.openrainbow.com/#/documentation/doc/sdk/node/api/events#Events+event_rainbow_onpresencechanged

    You don't receive an ID but a JID. Every contacts contains 2 identifiers: an ID and a JID. We have API getContactFromID(), getContactFromJID() to retrieve the associated contact from an ID or a JID. 

    Hope that these answers will help you.

    Regards,

    Olivier

    0
    Actions pour les commentaires Permalien

Vous devez vous connecter pour laisser un commentaire.

  • Demandez à la Communauté

    Vous avez besoin d'aide? Posez vos questions à la Communauté et obtenez des réponses d'autres utilisateurs Rainbow.

    Poster un message