whole_func_string: function newMessage(type, parentMessage, content, metadata) {
    var header = {
      msg_type: type,
      msg_id: uuid.v4(),
      session: parentMessage.header.session,
      username: parentMessage.header.username
    };
  
    metadata = metadata || {};
    content = content || {};
    return createMessage(parentMessage.identities, header, parentMessage.header,
                         metadata, content);
  }
func_code_string: function newMessage(type, parentMessage, content, metadata) {
    var header = {
      msg_type: type,
      msg_id: uuid.v4(),
      session: parentMessage.header.session,
      username: parentMessage.header.username
    };
  
    metadata = metadata || {};
    content = content || {};
    return createMessage(parentMessage.identities, header, parentMessage.header,
                         metadata, content);
  }
func_documentation_string: Creates a new message of the specified type, in association to a parent (incoming message) and optional metadata and content.