From 2ecc2d8098347762d5facb6d8f4d013220d34b63 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 11 Sep 2024 05:16:55 +0200 Subject: [PATCH] Added -size-restricted URL pattern for gfycat. Fixed missing getUser argument. --- src/dissectLink.js | 4 ++++ src/sources/getPosts.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dissectLink.js b/src/dissectLink.js index 1a05bcb..69a6bcc 100644 --- a/src/dissectLink.js +++ b/src/dissectLink.js @@ -34,6 +34,10 @@ const hosts = [{ method: 'vidbleAlbum', label: 'vidble', pattern: new urlPattern('http(s)\\://(www.)vidble.com/album/:id') +}, { + method: 'gfycat', + label: 'gfycat', + pattern: new urlPattern('http(s)\\://(:server.)gfycat.com/:id(-size_restricted.gif)') }, { method: 'gfycat', label: 'gfycat', diff --git a/src/sources/getPosts.js b/src/sources/getPosts.js index eb52179..e257583 100644 --- a/src/sources/getPosts.js +++ b/src/sources/getPosts.js @@ -39,7 +39,7 @@ const getPostsWrap = (reddit, args) => { return {...accUserPosts, '[deleted]': {name: '[deleted]', deleted: true, posts: [post]}}; } - const user = await getUser(post.author.name); + const user = await getUser(post.author.name, reddit); return {...accUserPosts, [post.author.name]: {...user, posts: [post]}} }), userPosts);