adds emoji presentation selector
This commit is contained in:
parent
12902d126c
commit
59b928d4f7
|
@ -221,9 +221,11 @@ class HTMLProcessor:
|
||||||
|
|
||||||
for node in tree.iterdescendants():
|
for node in tree.iterdescendants():
|
||||||
if node.tag != "code" and node.text:
|
if node.tag != "code" and node.text:
|
||||||
node.text = emoji.emojize(node.text, language="alias")
|
node.text = emoji.emojize(
|
||||||
|
node.text, language="alias", variant="emoji_type")
|
||||||
if node.getparent() and node.getparent().tag != "code" and node.tail:
|
if node.getparent() and node.getparent().tag != "code" and node.tail:
|
||||||
node.tail = emoji.emojize(node.tail, language="alias")
|
node.tail = emoji.emojize(
|
||||||
|
node.tail, language="alias", variant="emoji_type")
|
||||||
|
|
||||||
html = etree.tostring(tree, encoding="utf-8", method="html").decode()
|
html = etree.tostring(tree, encoding="utf-8", method="html").decode()
|
||||||
html = sanit.sanitize(html).rstrip("\n")
|
html = sanit.sanitize(html).rstrip("\n")
|
||||||
|
|
|
@ -773,7 +773,8 @@ class MatrixClient(nio.AsyncClient):
|
||||||
await self.send_fake_notice(
|
await self.send_fake_notice(
|
||||||
room_id, "Please reply to a message to react to it")
|
room_id, "Please reply to a message to react to it")
|
||||||
else:
|
else:
|
||||||
reaction = emoji.emojize(text, language="alias")
|
reaction = emoji.emojize(
|
||||||
|
text, language="alias", variant="emoji_type")
|
||||||
await self.send_reaction(room_id, reaction, reply_to_event_id)
|
await self.send_reaction(room_id, reaction, reply_to_event_id)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user