def _add_message_to_email_buffer(author_id, exploration_id, thread_id, message_id, message_length, old_status, new_status):
 thread = feedback_models.FeedbackThreadModel.get_by_exp_and_thread_id(exploration_id, thread_id)
 has_suggestion = thread.has_suggestion
 feedback_message_reference = feedback_domain.FeedbackMessageReference(exploration_id, thread_id, message_id)
 (batch_recipient_ids, other_recipient_ids) = _get_all_recipient_ids(exploration_id, thread_id, author_id)
 if (old_status != new_status):
  _send_feedback_thread_status_change_emails(other_recipient_ids, feedback_message_reference, old_status, new_status, exploration_id, has_suggestion)
 if (message_length > 0):
  _send_batch_emails(batch_recipient_ids, feedback_message_reference, exploration_id, has_suggestion)
  _send_instant_emails(other_recipient_ids, feedback_message_reference, exploration_id, has_suggestion)

def _add_message_to_email_buffer ( author_id , exploration_id , thread_id , message_id , message_length , old_status , new_status ) : thread = feedback_models . FeedbackThreadModel . get_by_exp_and_thread_id ( exploration_id , thread_id ) has_suggestion = thread . has_suggestion feedback_message_reference = feedback_domain . FeedbackMessageReference ( exploration_id , thread_id , message_id ) ( batch_recipient_ids , other_recipient_ids ) = _get_all_recipient_ids ( exploration_id , thread_id , author_id ) if ( old_status != new_status ) : _send_feedback_thread_status_change_emails ( other_recipient_ids , feedback_message_reference , old_status , new_status , exploration_id , has_suggestion ) if ( message_length > 0 ) : _send_batch_emails ( batch_recipient_ids , feedback_message_reference , exploration_id , has_suggestion ) _send_instant_emails ( other_recipient_ids , feedback_message_reference , exploration_id , has_suggestion )
sends the given message to the recipients of the given thread .