mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-14 20:30:06 +00:00
snapchat: add support for android short links
This commit is contained in:
parent
417a21ea91
commit
bef9b5b172
3 changed files with 4 additions and 6 deletions
|
@ -193,10 +193,7 @@ export default async function(host, patternMatch, lang, obj) {
|
||||||
r = await dailymotion(patternMatch);
|
r = await dailymotion(patternMatch);
|
||||||
break;
|
break;
|
||||||
case "snapchat":
|
case "snapchat":
|
||||||
r = await snapchat({
|
r = await snapchat(patternMatch);
|
||||||
hostname: url.hostname,
|
|
||||||
...patternMatch
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case "loom":
|
case "loom":
|
||||||
r = await loom({
|
r = await loom({
|
||||||
|
|
|
@ -91,7 +91,8 @@ export const services = {
|
||||||
"add/:username/:storyId",
|
"add/:username/:storyId",
|
||||||
"u/:username/:storyId",
|
"u/:username/:storyId",
|
||||||
"add/:username",
|
"add/:username",
|
||||||
"u/:username"
|
"u/:username",
|
||||||
|
"t/:shortLink",
|
||||||
],
|
],
|
||||||
subdomains: ["t", "story"],
|
subdomains: ["t", "story"],
|
||||||
},
|
},
|
||||||
|
|
|
@ -69,7 +69,7 @@ async function getStory(username, storyId) {
|
||||||
|
|
||||||
export default async function (obj) {
|
export default async function (obj) {
|
||||||
let params = obj;
|
let params = obj;
|
||||||
if (obj.hostname === 't.snapchat.com' && obj.shortLink) {
|
if (obj.shortLink) {
|
||||||
const link = await getRedirectingURL(`https://t.snapchat.com/${obj.shortLink}`);
|
const link = await getRedirectingURL(`https://t.snapchat.com/${obj.shortLink}`);
|
||||||
|
|
||||||
if (!link?.startsWith('https://www.snapchat.com/')) {
|
if (!link?.startsWith('https://www.snapchat.com/')) {
|
||||||
|
|
Loading…
Reference in a new issue