Skip to content

best way to save what you love

api/service-config: add support for `m` subdomain for twitch (#1407)

TfourJ1d5db46a79ec
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