[network/neochat/release/26.08] src/libneochat/qml: Don't show QR codes for private, invite-only rooms
Joshua Goins <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit eb2977a14a3566f35edf774d3c6da6a1238806e9 by Joshua Goins.
Committed on 24/07/2026 at 20:14.
Pushed by redstrate into branch 'release/26.08'.
Don't show QR codes for private, invite-only rooms
The point of these QR codes is to easily share rooms with friends.
But... that wouldn't work with an invite-only room. Relatedly, a user
brought up that this could unnessecarily leak the room ID too.
This change affects both rooms and spaces.
(cherry picked from commit 956700288ee8c1e93e388564c3078fe26cb18a3f)
M +11 -1 src/libneochat/qml/GroupChatDrawerHeader.qml
https://invent.kde.org/network/neochat/-/commit/eb2977a14a3566f35edf774d3c6da6a1238806e9
diff --git a/src/libneochat/qml/GroupChatDrawerHeader.qml b/src/libneochat/qml/GroupChatDrawerHeader.qml
index cd2eb810c..4e95bf7b8 100644
--- a/src/libneochat/qml/GroupChatDrawerHeader.qml
+++ b/src/libneochat/qml/GroupChatDrawerHeader.qml
@@ -91,10 +91,20 @@ ColumnLayout {
Layout.preferredWidth: Kirigami.Units.iconSizes.large
Layout.preferredHeight: Kirigami.Units.iconSizes.large
Layout.rightMargin: Kirigami.Units.largeSpacing
+ // It doesn't make sense to scan a QR code to join an invite-only room... that isn't possible
+ visible: root.room.joinRuleString !== "invite"
+
contentItem: Barcode {
id: barcode
barcodeType: Barcode.QRCode
- content: "https://matrix.to/#/" + root.room.id
+ content: {
+ const firstAlias = root.room.aliases[0];
+ if (firstAlias) {
+ return "https://matrix.to/#/" + firstAlias;
+ } else {
+ return "https://matrix.to/#/" + root.room.id;
+ }
+ }
}
onClicked: {