You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the delete message socket, this socket will delete a message from the database with the 'server-message-delete' event. As well as telling all devices connected to the server so it could be updated at the same time. This socket will take an 'id' argument for the id for the message, a 'room' argument for the room of the operation, a 'responseToken' argument for the response and finally a 'key' argument for the key. Also as I mentioned before, we are NOT using the default websockets, we are using the socket.io library for web sockets.
What is a response token??
A response token is a token to send a request to if an error occurs.
Example
constio=require("socket.io");constsocket=io("<URL>",{transports: ["websocket"]});// Send to serversocket.emit("server-message-delete","<ID>","<ROOM>","<TOKEN>","<KEY>");socket.on("client-message-delete:room(<ROOM>)",()=>{/* This will run when a user in the same room types*/});