code: function create_message(req, data) {
  	debug.assert(req).is('object');
  	debug.assert(data).is('object');
  	var msg = copy(data);
  	msg.$id = require('node-uuid').v4();
  	req.session.client.messages[msg.$id] = msg;
  	return msg;
  }
docs: Create message