From 5c49c35b821f12ad07b324e1653ae9a3eb37ad8b Mon Sep 17 00:00:00 2001 From: Arno Rehn Date: Sun, 5 Oct 2025 16:40:59 +0200 Subject: [PATCH] Space overview: Fix displayed name of direct chats When in the space overview page, direct chats were previously only shown with their room ID. Fix this by getting the actual NeoChatRoom and its displayName. --- src/spaces/models/spacechildrenmodel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/spaces/models/spacechildrenmodel.cpp b/src/spaces/models/spacechildrenmodel.cpp index 0777338c1..3066a138d 100644 --- a/src/spaces/models/spacechildrenmodel.cpp +++ b/src/spaces/models/spacechildrenmodel.cpp @@ -173,6 +173,10 @@ QVariant SpaceChildrenModel::data(const QModelIndex &index, int role) const SpaceTreeItem *child = getItem(index); if (role == DisplayNameRole) { + if (const auto room = static_cast(m_space->connection()->room(child->id()))) { + return room->displayName(); + } + auto displayName = child->name(); if (!displayName.isEmpty()) { return displayName;