diff --git a/src/app/conversationsadapter.cpp b/src/app/conversationsadapter.cpp index b1a5aa5ba1501c2868c557606b50f5729c23896b..de792930b7befeba39a3d85bc7138eeb19eec244 100644 --- a/src/app/conversationsadapter.cpp +++ b/src/app/conversationsadapter.cpp @@ -430,6 +430,7 @@ ConversationsAdapter::getConvInfoMap(const QString& convId) return {{"convId", convId}, {"bestId", bestId}, {"title", lrcInstance_->getCurrentConversationModel()->title(convId)}, + {"description", lrcInstance_->getCurrentConversationModel()->description(convId)}, {"uri", peerUri}, {"uris", accountInfo.conversationModel->peersForConversation(convId)}, {"isSwarm", convInfo.isSwarm()}, diff --git a/src/app/mainview/MainView.qml b/src/app/mainview/MainView.qml index 231025209d508647487de20c4ec6af1a31629ae6..e2a7fee3aedceda6ed0504a97896543a271ea7e2 100644 --- a/src/app/mainview/MainView.qml +++ b/src/app/mainview/MainView.qml @@ -182,6 +182,7 @@ Rectangle { if (item.convId === undefined) return chatView.headerUserAliasLabelText = item.title + chatView.headerUserUserNameLabelText = item.description if (item.callStackViewShouldShow) { if (inSettingsView) { toggleSettingsView() diff --git a/src/app/mainview/components/ChatView.qml b/src/app/mainview/components/ChatView.qml index 0dfc8f6d806024feeb9708bcad08c733f31df954..1cca059156ab77419b23b9c3c8aec5379d253c02 100644 --- a/src/app/mainview/components/ChatView.qml +++ b/src/app/mainview/components/ChatView.qml @@ -33,6 +33,7 @@ Rectangle { id: root property string headerUserAliasLabelText: "" + property string headerUserUserNameLabelText: "" property bool allMessagesLoaded @@ -63,6 +64,7 @@ Rectangle { Layout.minimumWidth: JamiTheme.chatViewHeaderMinimumWidth userAliasLabelText: headerUserAliasLabelText + userUserNameLabelText: headerUserUserNameLabelText DropArea { anchors.fill: parent diff --git a/src/libclient/conversationmodel.cpp b/src/libclient/conversationmodel.cpp index 6f0029066570fd475bae62f200ba5aa28ac64440..879e9f5a73aa81e6aa523642087df01ca327d8ce 100644 --- a/src/libclient/conversationmodel.cpp +++ b/src/libclient/conversationmodel.cpp @@ -1082,10 +1082,15 @@ QString ConversationModel::description(const QString& conversationId) const { auto conversationOpt = getConversationForUid(conversationId); - if (!conversationOpt.has_value()) { + if (!conversationOpt.has_value()) return {}; - } auto& conversation = conversationOpt->get(); + if (conversation.isCoreDialog()) { + auto peer = pimpl_->peersForConversation(conversation); + if (peer.isEmpty()) + return {}; + return owner.contactModel->bestIdForContact(peer.front()); + } return conversation.infos["description"]; }