From 112866096cfa565b47bac48283a851f290cc92d1 Mon Sep 17 00:00:00 2001 From: wukko Date: Thu, 12 Dec 2024 23:00:49 +0600 Subject: [PATCH] api/url: return a diff error when youtube is disabled on main instance --- api/src/processing/url.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/src/processing/url.js b/api/src/processing/url.js index 64517099..8f0e7dc2 100644 --- a/api/src/processing/url.js +++ b/api/src/processing/url.js @@ -181,6 +181,11 @@ export function extract(url) { } if (!env.enabledServices.has(host)) { + // show a different message when youtube is disabled on official instances + // as it only happens when shit hits the fan + if (new URL(env.apiURL).hostname.endsWith(".imput.net") && host === "youtube") { + return { error: "youtube.temporary_disabled" }; + } return { error: "service.disabled" }; }