services: add facebook support (#403)
* feat: add facebook support * chore: fix fail check * chore: minor fix * chore: add service in README.md * chore: cleaning post-merge code * facebook: add shared link pattern * chore: clean up removing unnecessarily code * fix: facebook shared link pattern * matchActionDecider: redirect to facebook video instead of rendering * facebook: pass sourceUrl in object * url: fix botched lint * fix: facebook shared link pattern with clean up * test: change facebook test response to redirect --------- Co-authored-by: dumbmoron <log@riseup.net>
This commit is contained in:
@@ -25,6 +25,7 @@ import twitch from "./services/twitch.js";
|
||||
import rutube from "./services/rutube.js";
|
||||
import dailymotion from "./services/dailymotion.js";
|
||||
import loom from "./services/loom.js";
|
||||
import facebook from "./services/facebook.js";
|
||||
|
||||
let freebind;
|
||||
|
||||
@@ -192,6 +193,11 @@ export default async function(host, patternMatch, lang, obj) {
|
||||
r = await loom({
|
||||
id: patternMatch.id
|
||||
});
|
||||
case "facebook":
|
||||
r = await facebook({
|
||||
...patternMatch,
|
||||
sourceUrl: url.href
|
||||
});
|
||||
break;
|
||||
default:
|
||||
return createResponse("error", {
|
||||
|
||||
Reference in New Issue
Block a user