private function parseAttachmentMessage($index, $answer)
    {
        $templateType = null;

        if (isset($answer['type'])) {
            $templateType = $answer['type'];
        }

        $attachment = $index === 'attachment' ? $answer : $answer['attachment'];

        if (isset($attachment['payload']) && isset($attachment['payload']['template_type'])) {
            $templateType = $attachment['payload']['template_type'];
        }

        return [
            'type'    => $templateType,
            'content' => $answer
        ];
    }