def use(self, middleware):
        """
        attache middleware

        :param middleware:
        :return:
        """

        logger.debug('use')
        logger.debug(middleware)

        self.middlewares.append(middleware)

        di.injector.register(instance=middleware)
        di.bind(middleware, auto=True)

        # TODO: should use DI somehow
        if check_spec(['send_text_message'], middleware):
            self.chat.add_interface(middleware)

        return middleware