I'm having a problem to appear online at ejabberd, I'm doing a chat client for a customer and I have this part of the code:
client.connect();
client.on('session:started', () => {
client.getRoster()
client.sendPresence();
onConnect();
});
When I get session started event I send my presence to the server to appear "online" to other users, but it doesn't work, does the name of the event is wrong? The other functionalities work fine I can send message but only in a offline state. Any tips? Thanks in advance.
You need to send your presence to the server
On saving any new user, we need to subscribe that user
and opposite user has to accept the subscription wheneven they receive presence type as subscribe