javascript - Direct Message to online users in MeteorJS -


In the chat application, I want to be able to send messages online directly to two users. > Mizzao: user-status to see whether they are online or not. Let's imagine Tom and Sam 2 users. So both of them are online and using the application. Now when Tom sends a message to Sam and on the contrary, I want to send a message directly to Sam, without having to first store it via web sockets in Mujadi. Meteor streams looked like a viable alternative, but there is a problem here. Let's say that 1000 people are using the app in one go. Now some people can only send their friends messages how can I ensure security, so Sam can not edit some source files and read every message that goes through the wire.

Thank you.

fetch () user ( mizzao: user-status aswell), and then sending messages to them all I .forEach

using

Comments