In many Posts or Articles.I often saw something like that.
Client-Side :
socket.emit("shhh!Secrets", {
To : "AlexId",
Message : "Hello World!"
})
Server-Side:
socket.on("shhh!Secrets", (Send) => {
io.in(Send.TO).emit("SO...Secrets", Send.Message)
})
Whatever it is socketId , Specific user socketObj or room base .
What If I change Client Source code and change with others room or socketId then my crazy message will saved to others chat timeline...