From 1d5db46a79ec60804548380e03743e8b58413015 Mon Sep 17 00:00:00 2001 From: TfourJ <48729601+tfourj@users.noreply.github.com> Date: Sun, 10 Aug 2025 13:14:23 +0200 Subject: [PATCH] api/service-config: add support for `m` subdomain for twitch (#1407) * api/twitch: add support for m. subdomain * tests/twitch: add test for m. subdomain --- api/src/processing/service-config.js | 1 + api/src/util/tests/twitch.json | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/api/src/processing/service-config.js b/api/src/processing/service-config.js index c21a4409..55946026 100644 --- a/api/src/processing/service-config.js +++ b/api/src/processing/service-config.js @@ -165,6 +165,7 @@ export const services = { twitch: { patterns: [":channel/clip/:clip"], tld: "tv", + subdomains: ["clips", "www", "m"], }, twitter: { patterns: [ diff --git a/api/src/util/tests/twitch.json b/api/src/util/tests/twitch.json index fd6b84af..eda23cb3 100644 --- a/api/src/util/tests/twitch.json +++ b/api/src/util/tests/twitch.json @@ -29,5 +29,14 @@ "code": 200, "status": "tunnel" } + }, + { + "name": "clip (mobile subdomain)", + "url": "https://m.twitch.tv/rtgame/clip/TubularInventiveSardineCorgiDerp-PM47mJQQ2vsL5B5G", + "params": {}, + "expected": { + "code": 200, + "status": "redirect" + } } ] \ No newline at end of file