From 3ca65e0daf6177c449b5b8d7201e43ba36dc21f3 Mon Sep 17 00:00:00 2001 From: wukko Date: Thu, 23 Nov 2023 21:35:02 +0600 Subject: [PATCH] reddit: remove the rest of references to title --- src/modules/processing/match.js | 3 +-- src/modules/processing/servicesPatternTesters.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/processing/match.js b/src/modules/processing/match.js index 9857cdb1..feb91e34 100644 --- a/src/modules/processing/match.js +++ b/src/modules/processing/match.js @@ -67,8 +67,7 @@ export default async function(host, patternMatch, url, lang, obj) { case "reddit": r = await reddit({ sub: patternMatch["sub"], - id: patternMatch["id"], - title: patternMatch["title"] + id: patternMatch["id"] }); break; case "douyin": diff --git a/src/modules/processing/servicesPatternTesters.js b/src/modules/processing/servicesPatternTesters.js index b4c75a8c..9720a523 100644 --- a/src/modules/processing/servicesPatternTesters.js +++ b/src/modules/processing/servicesPatternTesters.js @@ -8,8 +8,7 @@ export const testers = { "youtube": (patternMatch) => (patternMatch["id"] && patternMatch["id"].length <= 11), - "reddit": (patternMatch) => (patternMatch["sub"] && patternMatch["id"] && patternMatch["title"] - && patternMatch["sub"].length <= 22 && patternMatch["id"].length <= 10 && patternMatch["title"].length <= 96), + "reddit": (patternMatch) => (patternMatch.sub?.length <= 22 && patternMatch.id?.length <= 10), "tiktok": (patternMatch) => ((patternMatch["user"] && patternMatch["postId"] && patternMatch["postId"].length <= 21) || (patternMatch["id"] && patternMatch["id"].length <= 13)),