javascript - Direct Message to online users in MeteorJS -
in chat application, want able send messages 2 users straight if there online. i'm using mizzao:user-status
observe if online or not. let's imagine 2 users tom , sam. both online , using application. when tom sends mesaage sam , vice-versa, want send message straight sam without first storing in mongodb through web sockets. meteor streams seemed viable option, here's problem. let's 1000 people using app @ once. people can send friends
messages. how ensure security sam can't edit source files , read everyone's messages going through wire.
thanks.
when doing chat app didn't utilize streams, since meteor reactive stored messages in collection, , find()
returning data, no packages needed. if wanted send info users, fetch()
users online(with mizzao:user-status
aswell), , sent message of them using .foreach
javascript meteor
No comments:
Post a Comment