socket.on('newMessage', (messageObj) => {
	if (roomNumber === messageObj.roomNumber) {

		console.log("message received:" + messageObj.message);
		$('#messages').append($('<li>').text(messageObj.userName + ' : ' + messageObj.message));

	}
});

socket.in wasn't behaving as advertised (broadcasting to all rooms). I decided to take matters into my own hands.

By Andrew, 2017-12-13 02:57:58