Compare commits
3 Commits
implement_
...
main
| Author | SHA1 | Date |
|---|---|---|
|
|
9c072b0e8e | |
|
|
c40ad1f7d3 | |
|
|
37982b43c7 |
|
|
@ -2,6 +2,7 @@ import asyncio
|
||||||
from html import escape
|
from html import escape
|
||||||
import json
|
import json
|
||||||
from typing import Any, Dict, Tuple, List, Awaitable, Callable
|
from typing import Any, Dict, Tuple, List, Awaitable, Callable
|
||||||
|
import markdown
|
||||||
|
|
||||||
from aiohttp import ClientTimeout
|
from aiohttp import ClientTimeout
|
||||||
from maubot import MessageEvent, Plugin
|
from maubot import MessageEvent, Plugin
|
||||||
|
|
@ -639,9 +640,11 @@ class NtfyBot(Plugin):
|
||||||
if click and not title:
|
if click and not title:
|
||||||
html_content += "%s<a href=\"%s\">%s</a>" % (
|
html_content += "%s<a href=\"%s\">%s</a>" % (
|
||||||
emoji, escape(click),
|
emoji, escape(click),
|
||||||
escape(body).replace("\n", "<br />"))
|
markdown.markdown(escape(body))
|
||||||
|
.replace("\n", "<br />"))
|
||||||
else:
|
else:
|
||||||
html_content += emoji + escape(body).replace("\n", "<br />")
|
html_content += (emoji + markdown.markdown(escape(body))
|
||||||
|
.replace("\n", "<br />"))
|
||||||
|
|
||||||
# add non-emoji tags
|
# add non-emoji tags
|
||||||
if tags:
|
if tags:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue