From 61830e630caa37633f4d6093f5b906794b516755 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Thu, 29 Feb 2024 12:33:34 +1300 Subject: [PATCH] fix for lotide posts which are missing commentsEnabled --- app/activitypub/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/activitypub/util.py b/app/activitypub/util.py index d71df066..26108d10 100644 --- a/app/activitypub/util.py +++ b/app/activitypub/util.py @@ -1184,7 +1184,7 @@ def create_post(activity_log: ActivityPubLog, community: Community, request_json nsfl_in_title = '[NSFL]' in request_json['object']['name'].upper() or '(NSFL)' in request_json['object']['name'].upper() post = Post(user_id=user.id, community_id=community.id, title=html.unescape(request_json['object']['name']), - comments_enabled=request_json['object']['commentsEnabled'], + comments_enabled=request_json['object']['commentsEnabled'] if 'commentsEnabled' in request_json['object'] else True, sticky=request_json['object']['stickied'] if 'stickied' in request_json['object'] else False, nsfw=request_json['object']['sensitive'], nsfl=request_json['object']['nsfl'] if 'nsfl' in request_json['object'] else nsfl_in_title,