'Send a message to a user.'

def send_message(self, message='', **kwargs):

    import slacker
    if (kwargs.get(ATTR_TARGET) is None):
        targets = [self._default_channel]
    else:
        targets = kwargs.get(ATTR_TARGET)
    data = kwargs.get(ATTR_DATA)
    attachments = (data.get(ATTR_ATTACHMENTS) if data else None)
    file = (data.get(ATTR_FILE) if data else None)
    title = kwargs.get(ATTR_TITLE)
    for target in targets:
        try:
            if (file is not None):
                file_as_bytes = self.load_file(url=file.get(ATTR_FILE_URL), local_path=file.get(ATTR_FILE_PATH), username=file.get(ATTR_FILE_USERNAME), password=file.get(ATTR_FILE_PASSWORD), auth=file.get(ATTR_FILE_AUTH))
                if file.get(ATTR_FILE_URL):
                    filename = file.get(ATTR_FILE_URL)
                else:
                    filename = file.get(ATTR_FILE_PATH)
                data = {'content': None, 'filetype': None, 'filename': filename, 'title': (title if title else filename), 'initial_comment': message, 'channels': target}
                self.slack.files.post('files.upload', data=data, files={'file': file_as_bytes})
            else:
                self.slack.chat.post_message(target, message, as_user=self._as_user, username=self._username, icon_emoji=self._icon, attachments=attachments, link_names=True)
        except slacker.Error as err:
            _LOGGER.error('Could    not    send    notification.    Error:    %s', err)
