You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: imap_mails_controller.rb
    path of file: ./repos/hitobito/app/controllers/mailing_lists
    
    the code of the file until where you have to start completion: #  frozen_string_literal: true

#  Copyright (c) 2012-2021, Hitobito AG. This file is part of
#  hitobito and licensed under 
    
  def destroy
    perform_imap do
      list_param(:ids).each do |id|
        imap.delete_by_uid(id.to_i, mailbox)
      end
    end

    redirect_to imap_mails_path(mailbox: mailbox), notice: destroy_flash_message
  end