Allow misskey markdown

main
Bob Mottram 2024-08-13 10:15:59 +01:00
parent 64f5f18a2f
commit f18170c5dc
2 changed files with 4 additions and 2 deletions

View File

@ -93,7 +93,8 @@ def meta_data_node_info(base_dir: str,
"nodeName": domain,
"mailerEnabled": False,
"publicTimelineVisibility": {},
"postFormats": ["text/plain", "text/html", "text/markdown"],
"postFormats": ["text/plain", "text/html",
"text/markdown", "text/x.misskeymarkdown"],
"FEPs": ["c648", "521a", "8fcf", "4ccd", "c118", "fffd",
"1970", "0837", "7628", "2677", "5e53"]
}

View File

@ -139,7 +139,8 @@ def convert_post_content_to_html(message_json: {}) -> None:
return
if not obj_json.get('content'):
return
if obj_json['mediaType'] != 'text/markdown':
if obj_json['mediaType'] not in ('text/markdown',
'text/x.misskeymarkdown'):
return
content_str = obj_json['content']
obj_json['content'] = markdown_to_html(content_str)