Ejemplo n.º 1
0
 public function deleteConversation(ConversationService $conversation, $user_id, $conversation_id)
 {
     try {
         if (Request::has('thread') && Request::get('thread')) {
             $response = $conversation->deleteConversationByThread($conversation_id);
         } else {
             $response = $conversation->deleteConversationById($conversation_id);
         }
         if ($response) {
             return $this->json_response->success($response);
         }
         return $this->json_response->error($response);
     } catch (Exception $e) {
         return $this->json_response->error(['error' => $e->getMessage()]);
     }
 }