Jenkins send multiple success/Destroy to slack notifications

I am trying to send Success/Failure notifications to slack channel but I am not entering the else if clause? can someone please help me here?

 post {
    always {
      cleanWs(deleteDirs: true)
      deleteDir()
    }
    success {
      script {
          if (params.OPERATION != 'Refresh' && params.ENV != 'select') {
              wrap([$class: 'BuildUser']) {
                slackSend channel: '#build-infra', color: 'good', "Job Name: ${JOB_BASE_NAME}\nStatus: Successful"
          }
        } else if (params.OPERATION == 'Destroy') {
            wrap([$class: 'BuildUser']) {
              slackSend channel: '#build-infra', color: '#FFFF00', "Job Name: ${JOB_BASE_NAME}\nStatus: Successful"
          }
        }
      }
    }
    failure {
      script {
        if (params.OPERATION != 'Refresh' && params.ENV != 'select') {
          wrap([$class: 'BuildUser']) {
            slackSend channel: '#build-infra', color: 'danger', message: "Job Name: ${JOB_BASE_NAME}\nStatus: Failed"
          }
        } else if (params.OPERATION == 'Destroy') {
            wrap([$class: 'BuildUser']) {
              slackSend channel: '#build-infra', color: '#ff6d2b', message: "Job Name: ${JOB_BASE_NAME}\nStatus: Failed"
          }
        }
      }
    }
  }

Not seeing an error message or the rest of the code:

  1. Your not using build user at all, so its probably worth dropping the wrap of build user. Also what does it do?
  2. How are you certain your if checks are right?
  3. I would recommend cleaning up your intenting so its easier to follow the code (you have closing brackets like 2 levels below where your open is)

@halkeye thanks for looking into it.
Able to receive only Build Success and Failure slack messages.
When i am trying to Destroy job, i should get Destroy success and failure am not able to get slack messages.
I am suspecting else part is not honouring, please correct me i am wrong?

Are you sure your checks for the message are right? The only difference I see is in the color definition, maybe first change the texts…