From 092980c0ff9514ad48b5ad70a541f6592c81beec Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 22 Dec 2025 15:02:24 -0500 Subject: [PATCH] Shorten room subtitles for direct chats Direct chats by their very nature is between two users, and you usually can keep track of who said what. There's no point in including the sender's name here, and most other chat applications exclude it for this reason (including Element X.) --- src/libneochat/eventhandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libneochat/eventhandler.cpp b/src/libneochat/eventhandler.cpp index 1d1e1cb28..68fd31a01 100644 --- a/src/libneochat/eventhandler.cpp +++ b/src/libneochat/eventhandler.cpp @@ -697,6 +697,9 @@ QString EventHandler::subtitleText(const NeoChatRoom *room, const Quotient::Room qCWarning(EventHandling) << "subtitleText called with event set to nullptr."; return {}; } + if (room->isDirectChat()) { + return plainBody(room, event, true); + } return singleLineAuthorDisplayname(room, event) + (event->isStateEvent() ? u" "_s : u": "_s) + plainBody(room, event, true); }