src/event/event-handler.js
function validateSubscriptionMessage (socket, message) {
  if (message.data && message.data.length === 1 && typeof message.data[0] === 'string') {
    return true
  }

  socket.sendError(C.TOPIC.EVENT, C.EVENT.INVALID_MESSAGE_DATA, message.raw)

  return false
}
function validateSubscriptionMessage (socket, message) {
  if (message.data && message.data.length === 1 && typeof message.data[0] === 'string') {
    return true
  }

  socket.sendError(C.TOPIC.EVENT, C.EVENT.INVALID_MESSAGE_DATA, message.raw)

  return false
}
function validateSubscriptionMessage ( socket , message ) { if ( message . data && message . data . length === 1 && typeof message . data [ 0 ] === 'string' ) { return true } socket . sendError ( C . TOPIC . EVENT , C . EVENT . INVALID_MESSAGE_DATA , message . raw ) return false }
Makes sure that subscription message contains the name of the event. Sends an error to the client
if not

@param {SocketWrapper} socket
@param {Object} message parsed and permissioned deepstream message

@private
@returns {Boolean} is valid subscription message
Makes sure that subscription message contains the name of the event . Sends an error to the client if not