Support/EventListener/TicketAttachmentEventListener.php
public function onDelete(ResourceEventInterface $event)
    {
        $attachment = $this->getAttachmentFromEvent($event);

        if (null === $message = $attachment->getMessage()) {
            $message = $this->persistenceHelper->getChangeSet($attachment, 'message')[0];
        }

        $this->updateMessage($message);
    }
public function onDelete(ResourceEventInterface $event)
    {
        $attachment = $this->getAttachmentFromEvent($event);

        if (null === $message = $attachment->getMessage()) {
            $message = $this->persistenceHelper->getChangeSet($attachment, 'message')[0];
        }

        $this->updateMessage($message);
    }
Delete event handler.

@param ResourceEventInterface $event