sendMessage.js 149 B

12345
  1. export const sendMessage = (data, socket) => {
  2. if (data.message && data.message.length < 200) {
  3. socket.emit('message', data);
  4. }
  5. };