M
M
Mikhailo Poberezhny2016-04-06 14:58:50
MongoDB
Mikhailo Poberezhny, 2016-04-06 14:58:50

How do I inform the user that a dialog has been created with him?

For example, I have a profile of another user, I go to it and click "write a message" how to inform him about this that a new dialogue has been created. The problem is that I don't have its socket.id, so I can't send it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2016-04-07
@bingo347

When connecting socket.io on the client, send a session token
On the server, get the userID from the session and associate socket.id with it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question