From 51b79df5916cd06fc696ae0e2a7a21a9e57f38cd Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:31:55 +1200 Subject: [PATCH] don't add paragraph tags around replies --- app/activitypub/util.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/activitypub/util.py b/app/activitypub/util.py index 723a9030..1d9406b2 100644 --- a/app/activitypub/util.py +++ b/app/activitypub/util.py @@ -1710,9 +1710,7 @@ def create_post_reply(activity_log: ActivityPubLog, community: Community, in_rep ap_create_id=request_json['id'], ap_announce_id=announce_id, instance_id=user.instance_id) - if 'content' in request_json['object']: # Kbin, Mastodon, etc provide their posts as html - if not request_json['object']['content'].startswith('
') or not request_json['object']['content'].startswith('
'): - request_json['object']['content'] = '' + request_json['object']['content'] + '
' + if 'content' in request_json['object']: post_reply.body_html = allowlist_html(request_json['object']['content']) if 'source' in request_json['object'] and isinstance(request_json['object']['source'], dict) and \ 'mediaType' in request_json['object']['source'] and request_json['object']['source']['mediaType'] == 'text/markdown':