diff --git a/src/app/qml/InvitationView.qml b/src/app/qml/InvitationView.qml index f1a75ef8c..aab6b12df 100644 --- a/src/app/qml/InvitationView.qml +++ b/src/app/qml/InvitationView.qml @@ -52,6 +52,15 @@ ColumnLayout { Layout.alignment: Qt.AlignHCenter } + Kirigami.SelectableLabel { + Layout.fillWidth: true + font: Kirigami.Theme.smallFont + textFormat: TextEdit.PlainText + visible: root.currentRoom && root.currentRoom.canonicalAlias + text: root.currentRoom && root.currentRoom.canonicalAlias ? root.currentRoom.canonicalAlias : "" + color: Kirigami.Theme.disabledTextColor + } + Kirigami.Heading { text: root.currentRoom.displayName @@ -70,7 +79,14 @@ ColumnLayout { spacing: Kirigami.Units.smallSpacing Kirigami.Heading { - text: root.currentRoom.displayName + text: root.invitingMember.displayName + + Layout.alignment: Qt.AlignHCenter + } + + QQC2.Label { + text: root.invitingMember.id + color: Kirigami.Theme.disabledTextColor Layout.alignment: Qt.AlignHCenter } diff --git a/src/libneochat/neochatroom.cpp b/src/libneochat/neochatroom.cpp index a605edd42..7b7a58b13 100644 --- a/src/libneochat/neochatroom.cpp +++ b/src/libneochat/neochatroom.cpp @@ -1674,6 +1674,10 @@ void NeoChatRoom::setRoomState(const QString &type, const QString &stateKey, con NeochatRoomMember *NeoChatRoom::qmlSafeMember(const QString &memberId) { + if (memberId.isEmpty()) { + return nullptr; + } + if (!m_memberObjects.contains(memberId)) { auto member = m_memberObjects.emplace(memberId, std::make_unique(this, memberId)).first->second.get(); QQmlEngine::setObjectOwnership(member, QQmlEngine::CppOwnership);