public function postMessage(Message $message)
    {
        $options = [
            'text' => $message->getText(),
            'channel' => $message->data['channel'],
            'as_user' => true,
        ];

        if ($message->hasAttachments()) {
            $options['attachments'] = json_encode($message->getAttachments());
        }

        return $this->apiCall('chat.postMessage', $options);
    }