Skip to content

Commit 1d5db46

Browse files
authored
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
1 parent d3ea80f commit 1d5db46

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

api/src/processing/service-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export const services = {
165165
twitch: {
166166
patterns: [":channel/clip/:clip"],
167167
tld: "tv",
168+
subdomains: ["clips", "www", "m"],
168169
},
169170
twitter: {
170171
patterns: [

api/src/util/tests/twitch.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,14 @@
2929
"code": 200,
3030
"status": "tunnel"
3131
}
32+
},
33+
{
34+
"name": "clip (mobile subdomain)",
35+
"url": "https://m.twitch.tv/rtgame/clip/TubularInventiveSardineCorgiDerp-PM47mJQQ2vsL5B5G",
36+
"params": {},
37+
"expected": {
38+
"code": 200,
39+
"status": "redirect"
40+
}
3241
}
3342
]

0 commit comments

Comments
 (0)