   msg = 'You have a new message. <a href="' + link + '"">Click here to view</a>!'
   api_controller.render_flash 'info', msg, (err, html) ->
     data = {
+      status: 'ok'
       message: html
     }
     send_notification user_id, data

  for message in messages
    if message.user_id of listeners
      # Respond to the listener
      listeners[message.user_id].send message.data
      closed[message.user_id] = true
      delete listeners[message.user_id]
    else if message.user_id of closed

  , constants.NOTIFICATION_LOOP_TIMEOUT

exports.get_notifications = (req, res) ->
  # Put the response object in our listeners map
  if req.user.id of listeners
    listeners[req.user.id].push res
  else
    listeners[req.user.id] = [res]

send_notification = (user_id, data) ->
  messages.push {user_id, data}
