Use QML safe member for invitations

Has the sideeffect of making sure that the avatar colors are the same between the invitation view and the sidebar
This commit is contained in:
Tobias Fella
2025-06-11 22:19:59 +02:00
committed by Tobias Fella
parent 29abe0bacb
commit 207c824ec7
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ ColumnLayout {
id: root
required property NeoChatRoom currentRoom
readonly property var invitingMember: currentRoom.member(currentRoom.invitingUserId)
readonly property var invitingMember: currentRoom.qmlSafeMember(currentRoom.invitingUserId)
readonly property string inviteTimestamp: root.currentRoom.inviteTimestamp.toLocaleString(Qt.locale(), Locale.ShortFormat)
spacing: Kirigami.Units.smallSpacing

View File

@@ -557,7 +557,7 @@ public:
* responsibility of the caller to ensure that they only ask for objects
* for real senders.
*/
NeochatRoomMember *qmlSafeMember(const QString &memberId);
Q_INVOKABLE NeochatRoomMember *qmlSafeMember(const QString &memberId);
/**
* @brief Pin a message in the room.