diff --git a/src/backend/matrix_client.py b/src/backend/matrix_client.py
index 050b00b4..d291905d 100644
--- a/src/backend/matrix_client.py
+++ b/src/backend/matrix_client.py
@@ -2139,17 +2139,19 @@ class MatrixClient(nio.AsyncClient):
if unread or highlight:
AlertRequested(high_importance=highlight)
- notif_room = room.display_name
- notif_sender = item.sender_name or item.sender_id
- body_start = f"{notif_sender}: "
+ members = self.models[self.user_id, room.room_id, "members"]
+ room_name = room.display_name
+ sender = item.sender_name or item.sender_id
- if notif_room == notif_sender:
+ if len(members) == 2 and room_name == sender:
body_start = ""
elif isinstance(ev, nio.RoomMessageEmote):
- body_start = f"{notif_sender} "
+ body_start = f"{sender} "
+ else:
+ body_start = f"{sender}: "
await self.backend.desktop_notify(
- title = notif_room,
+ title = room_name,
body = f"{body_start}{item.inline_content}",
# await self.backend.media_cache.get_thumbnail(
# item.sender_avatar, 32, 32,