facebook: pass sourceUrl in object

This commit is contained in:
dumbmoron 2024-07-07 13:52:50 +00:00
parent 2b2ab86117
commit fba7653d6e
No known key found for this signature in database
2 changed files with 5 additions and 2 deletions

View File

@ -194,7 +194,10 @@ export default async function(host, patternMatch, lang, obj) {
id: patternMatch.id
});
case "facebook":
r = await facebook(url.href, patternMatch);
r = await facebook({
...patternMatch,
sourceUrl: url.href
});
break;
default:
return createResponse("error", {

View File

@ -24,7 +24,7 @@ function resolveUrl(url) {
.catch(() => false)
}
export default async function (sourceUrl, { shortLink, username, id }) {
export default async function({ sourceUrl, shortLink, username, id }) {
const isShortLink = !!shortLink?.length
const isSharedLink = !!sourceUrl.match(/\/share\/v\//)?.length