From c9c6db8e04cf5a57a9511df76bc9c300164bba04 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Fri, 27 Feb 2026 15:24:18 -0500 Subject: [PATCH] Prevent users from trying to search in encrypted rooms I forgot that this has to be handled client-side (duh, we're the only one who can read the messages!) This has already tripped up at least one user, and probably more. So until we support that, our UI shouldn't lie to you. --- src/roominfo/RoomSearchPage.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/roominfo/RoomSearchPage.qml b/src/roominfo/RoomSearchPage.qml index 23d0d85ea..cf79ad5f4 100644 --- a/src/roominfo/RoomSearchPage.qml +++ b/src/roominfo/RoomSearchPage.qml @@ -30,6 +30,9 @@ SearchPage { */ property string senderId + // This requires client-side search we don't implement yet + readonly property bool canSearch: !room.usesEncryption + title: i18nc("@action:title", "Search Messages") model: SearchModel { @@ -45,6 +48,9 @@ SearchPage { searchFieldPlaceholder: i18n("Find messages…") noSearchPlaceholderMessage: i18n("Enter text to start searching") noResultPlaceholderMessage: i18n("No messages found") + customPlaceholderIcon: "lock-symbolic" + customPlaceholderText: !canSearch ? i18n("Cannot search in encrypted rooms") : "" + enableSearch: canSearch listVerticalLayoutDirection: ListView.BottomToTop