def _add_feedback_message_reference(user_id, reference):
 model = feedback_models.UnsentFeedbackEmailModel.get(user_id, strict=False)
 if (model is not None):
  model.feedback_message_references.append(reference.to_dict())
  model.put()
 else:
  model = feedback_models.UnsentFeedbackEmailModel(id=user_id, feedback_message_references=[reference.to_dict()])
  model.put()
  enqueue_feedback_message_batch_email_task(user_id)

def _add_feedback_message_reference ( user_id , reference ) : model = feedback_models . UnsentFeedbackEmailModel . get ( user_id , strict = False ) if ( model is not None ) : model . feedback_message_references . append ( reference . to_dict ( ) ) model . put ( ) else : model = feedback_models . UnsentFeedbackEmailModel ( id = user_id , feedback_message_references = [ reference . to_dict ( ) ] ) model . put ( ) enqueue_feedback_message_batch_email_task ( user_id )
adds a new message to the feedback message buffer that is used to generate the next notification email to the given user .