code: func preprocess(r *http.Request) (*dt.Msg, error) {
  	req := &dt.Request{}
  	err := json.NewDecoder(r.Body).Decode(req)
  	if err != nil {
  		log.Info("could not parse empty body", err)
  		return nil, err
  	}
  	sendPostReceiveEvent(&req.CMD)
  	u, err := dt.GetUser(db, req)
  	if err != nil {
  		return nil, err
  	}
  	sendPreProcessingEvent(&req.CMD, u)
  	// TODO trigger training if needed (see buildInput)
  	return NewMsg(u, req.CMD)
  }
docs: // preprocess converts a user input into a Msg that's been persisted to the
  // database