Q: Socket.io (1.x) .to(room) not working, but works without I'm building a simple messaging server and it works perfect using the socket.broadcast.emit() however if you use the socket.broadcast.in(room).emit() it dose not connect up. I've include the server code and client code below.
server
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var Parse = require('parse').Parse;

var room;

app.get('/', function(req, res){
  res.sendfile('index.html');
});

// When a new connection is launched
io.on('connection', function(socket){

  console.log('user connected: '+socket.id);

  //========== INIT connection =========
  // once a client has connected, we expect to get a ping from them saying what room
  // they want to join
  socket.on('room', function(data) {
    room = data;

    socket.join(room);

    console.log('  + User: '+socket.id+' - joined Room: ['+room+']');
    console.log('  + User: '+socket.id+' - has Rooms: ['+socket.rooms+']');

    // Display all sockets connected to room
    inRoom(room);
  });

 //======== Delegates messages ========
 socket.on('message_send', function(data){

    var JSONdata  = JSON.parse(data);
    var room_l    = JSONdata.chat_id;
    var msg       = JSONdata.message;

    console.log('Room: ' + room_l + ' - Message: ' + msg);

    // Send message
    //io.emit('message_received', msg);
    //socket.broadcast.emit('message_received', msg);
    io.in('TZRfM7V5HH').emit('message_recieved', msg);
    //io.to(room_l).emit('message_received', msg);

    // Save message to parse
    parseSAVE(data);
  });
});

Client
<script>
  var socket = io();
  var msg = $('#m').val();

  var room = 'TZRfM7V5HH';

  $( document ).ready(function() {
    socket.emit('room',room);
    socket.emit('message_send', '{"chat_id":"'+room+'","message":"yoyoyo shits to hype"}');
  });

  $('form').submit(function(){
    $msg = $('#m').val();
    socket.emit('message_send', '{"chat_id":"'+room+'","message":"'+$msg+'"}');
    $('#messages').append($('<li>').text($msg));
    $('#m').val('');
    return false;
  });
  socket.on('message_received', function(msg){
    $('#messages').append($('<li>').text(msg));
  });
</script>

I have been playing around with this all week and I cant seem to figure out whats wrong with my implementation, any help or pointers would be greatly appreciated!
