mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 19:28:29 +00:00
facebook: pass sourceUrl in object
This commit is contained in:
parent
2b2ab86117
commit
fba7653d6e
@ -194,7 +194,10 @@ export default async function(host, patternMatch, lang, obj) {
|
|||||||
id: patternMatch.id
|
id: patternMatch.id
|
||||||
});
|
});
|
||||||
case "facebook":
|
case "facebook":
|
||||||
r = await facebook(url.href, patternMatch);
|
r = await facebook({
|
||||||
|
...patternMatch,
|
||||||
|
sourceUrl: url.href
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return createResponse("error", {
|
return createResponse("error", {
|
||||||
|
@ -24,7 +24,7 @@ function resolveUrl(url) {
|
|||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function (sourceUrl, { shortLink, username, id }) {
|
export default async function({ sourceUrl, shortLink, username, id }) {
|
||||||
const isShortLink = !!shortLink?.length
|
const isShortLink = !!shortLink?.length
|
||||||
const isSharedLink = !!sourceUrl.match(/\/share\/v\//)?.length
|
const isSharedLink = !!sourceUrl.match(/\/share\/v\//)?.length
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user