services: add snapchat support (#429)
* feat: snapchat support * chore: remove redundancy * chore: a bit of better matching * chore: update readme * refactor(snapchat): refactor story matching to use pickers * fix: small fix to directly linked stories * fix(snapchat): fix filenames * chore: update readme * ref(snapchat): rewrite service, new test, split redirects into a util * fix(snapchat): small fixes * chore: deepscan error fixed * fix: remove debug logging * fix(snapchat): fix merge, clean up code with new utils * fix(snapchat): update with suggested changes --------- Signed-off-by: Snazzah <7025343+Snazzah@users.noreply.github.com> Co-authored-by: jj <log@riseup.net>
This commit is contained in:
@@ -30,6 +30,11 @@ export const testers = {
|
||||
(patternMatch.author?.length <= 255 && patternMatch.song?.length <= 255)
|
||||
|| patternMatch.shortLink?.length <= 32,
|
||||
|
||||
"snapchat": (patternMatch) =>
|
||||
(patternMatch.username?.length <= 32 && (!patternMatch.storyId || patternMatch.storyId?.length <= 255))
|
||||
|| patternMatch.spotlightId?.length <= 255
|
||||
|| patternMatch.shortLink?.length <= 16,
|
||||
|
||||
"streamable": (patternMatch) =>
|
||||
patternMatch.id?.length === 6,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user