use html.raw instead
This commit is contained in:
parent
2e9d21c318
commit
4387c25fe9
1 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ class MisskeyPreviewModule(niobot.Module):
|
||||||
for line in textwrap.shorten(data["text"], width=1000).splitlines(keepends=True):
|
for line in textwrap.shorten(data["text"], width=1000).splitlines(keepends=True):
|
||||||
text_body.append("> " + (line or "\u200b"))
|
text_body.append("> " + (line or "\u200b"))
|
||||||
body = "<a href=\"%s\">@%s:</a>\n\n%s" % (
|
body = "<a href=\"%s\">@%s:</a>\n\n%s" % (
|
||||||
"https://%s/notes/%s" % (parsed.netloc, username),
|
"https://%s/@%s" % (parsed.netloc, username),
|
||||||
username,
|
username,
|
||||||
"".join(text_body),
|
"".join(text_body),
|
||||||
)
|
)
|
||||||
|
@ -50,7 +50,7 @@ class MisskeyPreviewModule(niobot.Module):
|
||||||
room,
|
room,
|
||||||
body,
|
body,
|
||||||
reply_to=event,
|
reply_to=event,
|
||||||
content_type="html",
|
content_type="html.raw",
|
||||||
override={"body": f"@{username}: {data['text']!r}"}
|
override={"body": f"@{username}: {data['text']!r}"}
|
||||||
)
|
)
|
||||||
sent.append(post_id)
|
sent.append(post_id)
|
||||||
|
|
Loading…
Reference in a new issue