mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
PeerTube: Community description is soft-break markdown in 'summary' field
This commit is contained in:
parent
e4bc3cb3d9
commit
3aeda06a7f
1 changed files with 2 additions and 0 deletions
|
@ -552,6 +552,7 @@ def refresh_community_profile_task(community_id):
|
|||
community.nsfl = activity_json['nsfl']
|
||||
community.title = activity_json['name']
|
||||
community.description = activity_json['summary'] if 'summary' in activity_json else ''
|
||||
community.description_html = markdown_to_html(community.description)
|
||||
community.rules = activity_json['rules'] if 'rules' in activity_json else ''
|
||||
community.rules_html = lemmy_markdown_to_html(activity_json['rules'] if 'rules' in activity_json else '')
|
||||
community.restricted_to_mods = activity_json['postingRestrictedToMods'] if 'postingRestrictedToMods' in activity_json else True
|
||||
|
@ -739,6 +740,7 @@ def actor_json_to_model(activity_json, address, server):
|
|||
instance_id=find_instance_id(server),
|
||||
low_quality='memes' in activity_json['preferredUsername']
|
||||
)
|
||||
community.description_html = markdown_to_html(community.description)
|
||||
# parse markdown and overwrite html field with result
|
||||
if 'source' in activity_json and \
|
||||
activity_json['source']['mediaType'] == 'text/markdown':
|
||||
|
|
Loading…
Add table
Reference in a new issue