mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-03 00:31:25 -08:00
fix for lotide posts which are missing commentsEnabled
This commit is contained in:
parent
e3099a0b66
commit
61830e630c
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
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,
|
post = Post(user_id=user.id, community_id=community.id,
|
||||||
title=html.unescape(request_json['object']['name']),
|
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,
|
sticky=request_json['object']['stickied'] if 'stickied' in request_json['object'] else False,
|
||||||
nsfw=request_json['object']['sensitive'],
|
nsfw=request_json['object']['sensitive'],
|
||||||
nsfl=request_json['object']['nsfl'] if 'nsfl' in request_json['object'] else nsfl_in_title,
|
nsfl=request_json['object']['nsfl'] if 'nsfl' in request_json['object'] else nsfl_in_title,
|
||||||
|
|
Loading…
Add table
Reference in a new issue