parameters: (self, recipient=None, parent=None, auto_moderators=[])
return_statement: return is_successful
docstring: Save as many messages as there are recipients.
  
          Additional actions:
          - If it's a reply, build a conversation
          - Call auto-moderators
          - Notify parties if needed
  
          Return False if one of the messages is rejected.
docstring_summary: Save as many messages as there are recipients.
docstring_tokens: Save as many messages as there are recipients .
function: def save(self, recipient=None, parent=None, auto_moderators=[]):
          """
          Save as many messages as there are recipients.
  
          Additional actions:
          - If it's a reply, build a conversation
          - Call auto-moderators
          - Notify parties if needed
  
          Return False if one of the messages is rejected.
  
          """
          recipients = self.cleaned_data.get('recipients', [])
          if parent and not parent.thread_id:  # at the very first reply, make it a conversation
              parent.thread = parent
              parent.save()
              # but delay the setting of parent.replied_at to the moderation step
          if parent:
              self.instance.parent = parent
              self.instance.thread_id = parent.thread_id
          initial_moderation = self.instance.get_moderation()
          initial_dates = self.instance.get_dates()
          initial_status = self.instance.moderation_status
          if recipient:
              if isinstance(recipient, get_user_model()) and recipient in recipients:
                  recipients.remove(recipient)
              recipients.insert(0, recipient)
          is_successful = True
          for r in recipients:
              if isinstance(r, get_user_model()):
                  self.instance.recipient = r
              else:
                  self.instance.recipient = None
                  self.instance.email = r
              self.instance.pk = None  # force_insert=True is not accessible from here
              self.instance.auto_moderate(auto_moderators)
              self.instance.clean_moderation(initial_status)
              self.instance.clean_for_visitor()
              m = super(BaseWriteForm, self).save()
              if self.instance.is_rejected():
                  is_successful = False
              self.instance.update_parent(initial_status)
              self.instance.notify_users(initial_status, self.site)
              # some resets for next reuse
              if not isinstance(r, get_user_model()):
                  self.instance.email = ''
              self.instance.set_moderation(*initial_moderation)
              self.instance.set_dates(*initial_dates)
          return is_successful
function_tokens: def save ( self , recipient = None , parent = None , auto_moderators = [ ] ) : recipients = self . cleaned_data . get ( 'recipients' , [ ] ) if parent and not parent . thread_id : # at the very first reply, make it a conversation parent . thread = parent parent . save ( ) # but delay the setting of parent.replied_at to the moderation step if parent : self . instance . parent = parent self . instance . thread_id = parent . thread_id initial_moderation = self . instance . get_moderation ( ) initial_dates = self . instance . get_dates ( ) initial_status = self . instance . moderation_status if recipient : if isinstance ( recipient , get_user_model ( ) ) and recipient in recipients : recipients . remove ( recipient ) recipients . insert ( 0 , recipient ) is_successful = True for r in recipients : if isinstance ( r , get_user_model ( ) ) : self . instance . recipient = r else : self . instance . recipient = None self . instance . email = r self . instance . pk = None # force_insert=True is not accessible from here self . instance . auto_moderate ( auto_moderators ) self . instance . clean_moderation ( initial_status ) self . instance . clean_for_visitor ( ) m = super ( BaseWriteForm , self ) . save ( ) if self . instance . is_rejected ( ) : is_successful = False self . instance . update_parent ( initial_status ) self . instance . notify_users ( initial_status , self . site ) # some resets for next reuse if not isinstance ( r , get_user_model ( ) ) : self . instance . email = '' self . instance . set_moderation ( * initial_moderation ) self . instance . set_dates ( * initial_dates ) return is_successful