def METHOD_NAME(
    self, on_new_message: Callable[[UserMessage], Awaitable[Any]]
) -> Blueprint:
    rocketchat_webhook = Blueprint("rocketchat_webhook", __name__)
    @rocketchat_webhook.route("/", methods=["GET"])
    async def health(_: Request) -> HTTPResponse:
        return response.json({"status": "ok"})
    @rocketchat_webhook.route("/webhook", methods=["GET", "POST"])
    async def webhook(request: Request) -> HTTPResponse:
        output = request.json
        metadata = self.get_metadata(request)
        if output:
            if "visitor" not in output:
                sender_name = output.get("user_name", None)
                text = output.get("text", None)
                recipient_id = output.get("channel_id", None)
            else:
                messages_list = output.get("messages", None)
                text = messages_list[0].get("msg", None)
                sender_name = messages_list[0].get("username", None)
                recipient_id = output.get("_id")
            await self.send_message(
                text, sender_name, recipient_id, on_new_message, metadata
            )
        return response.text("")
    return rocketchat_webhook