From 672732670d6b213327fcd7f41a8ffa2c37d8fe98 Mon Sep 17 00:00:00 2001 From: blank X Date: Thu, 3 Sep 2020 16:35:52 +0700 Subject: [PATCH] Fix weird crossposting bug Cause: https://redd.it/ffhfm0 --- redditbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redditbot.py b/redditbot.py index de2d7a3..914ee60 100644 --- a/redditbot.py +++ b/redditbot.py @@ -148,7 +148,7 @@ async def main(): async def _actual_start_post(random_post, chats): text = f'{html.escape(random_post.title)}' cpid = getattr(random_post, 'crosspost_parent', None) - if cpid: + if cpid and getattr(random_post, 'crosspost_parent_list', None): random_post = reddit.submission(cpid[3:]) text += f' (crosspost of {html.escape(random_post.title)})' if not random_post.is_self: