Notifications: format replies properly

This commit is contained in:
miruka
2020-09-16 20:58:02 -04:00
parent 4cd562e02f
commit 22e7dc7e8d
2 changed files with 17 additions and 3 deletions

View File

@@ -2230,10 +2230,13 @@ class MatrixClient(nio.AsyncClient):
body = f"{sender}: {item.inline_content}"
NotificationRequested(
title = room_name,
body = body.replace("", "<br>"),
high_importance = highlight,
image = await self.get_notification_avatar(
title = room_name,
body = body.replace("", "<br>")
.replace(" ⏎⏎ ", f"<br>{'' * 24}<br>"),
image = await self.get_notification_avatar(
mxc=item.sender_avatar, user_id=item.sender_id,
) if item.sender_avatar else "",
)