From 3344d9d74a894188552cb66027c001d96abf00f8 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 28 Feb 2024 18:51:21 +0200 Subject: [PATCH] use undelete's new feature --- files/helpers/actions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 2b60c216d..f56f9e12f 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -192,7 +192,7 @@ def execute_snappy(post, v): body += "\n\n" if post.url and not post.url.startswith('/') and not post.url.startswith(f'{SITE_FULL}/') and not post.url.startswith(SITE_FULL_IMAGES): - if post.url.startswith('https://old.reddit.com/r/') and '/comments/' in post.url: + if post.url.startswith('https://old.reddit.com/r/'): rev = post.url.replace('https://old.reddit.com/', '') rev = f"* [undelete.pullpush.io](https://undelete.pullpush.io/{rev})\n\n" elif post.url.startswith("https://old.reddit.com/user/"): @@ -220,7 +220,7 @@ def execute_snappy(post, v): if "Snapshots:\n\n" not in body: body += "Snapshots:\n\n" if f'**[{title}]({href})**:\n\n' not in body: addition = f'**[{title}]({href})**:\n\n' - if href.startswith('https://old.reddit.com/r/') and '/comments/' in href: + if href.startswith('https://old.reddit.com/r/'): rev = href.replace('https://old.reddit.com/', '') addition += f'* [undelete.pullpush.io](https://undelete.pullpush.io/{rev})\n\n' elif href.startswith('https://old.reddit.com/user/'):