applications/conversations/controllers/class.messagescontroller.php
public function Clear($ConversationID = FALSE, $TransientKey = '') {
      $Session = Gdn::Session();
      
      // Yes/No response
      $this->_DeliveryType = DELIVERY_TYPE_BOOL;
      
      $ValidID = (is_numeric($ConversationID) && $ConversationID > 0);
      $ValidSession = ($Session->UserID > 0 && $Session->ValidateTransientKey($TransientKey));
      
      if ($ValidID && $ValidSession) {
         // Clear it
         $this->ConversationModel->Clear($ConversationID, $Session->UserID);
         $this->InformMessage(T('The conversation has been cleared.'));
         $this->RedirectUrl = Url('/messages/all');
      }
      
      $this->Render();
   }
public function Clear($ConversationID = FALSE, $TransientKey = '') {
      $Session = Gdn::Session();
      
      // Yes/No response
      $this->_DeliveryType = DELIVERY_TYPE_BOOL;
      
      $ValidID = (is_numeric($ConversationID) && $ConversationID > 0);
      $ValidSession = ($Session->UserID > 0 && $Session->ValidateTransientKey($TransientKey));
      
      if ($ValidID && $ValidSession) {
         // Clear it
         $this->ConversationModel->Clear($ConversationID, $Session->UserID);
         $this->InformMessage(T('The conversation has been cleared.'));
         $this->RedirectUrl = Url('/messages/all');
      }
      
      $this->Render();
   }
public function Clear ( $ ConversationID = FALSE , $ TransientKey = '' ) { $ Session = Gdn :: Session ( ) ; // Yes/No response $ this -> _DeliveryType = DELIVERY_TYPE_BOOL ; $ ValidID = ( is_numeric ( $ ConversationID ) && $ ConversationID > 0 ) ; $ ValidSession = ( $ Session -> UserID > 0 && $ Session -> ValidateTransientKey ( $ TransientKey ) ) ; if ( $ ValidID && $ ValidSession ) { // Clear it $ this -> ConversationModel -> Clear ( $ ConversationID , $ Session -> UserID ) ; $ this -> InformMessage ( T ( 'The conversation has been cleared.' ) ) ; $ this -> RedirectUrl = Url ( '/messages/all' ) ; } $ this -> Render ( ) ; }
Clear the message history for a specific conversation & user.

@since 2.0.0
@access public

@param int $ConversationID Unique ID of conversation to clear.
Clear the message history for a specific conversation & user .