diff --git a/src/app/pages/client/ClientNonUIFeatures.tsx b/src/app/pages/client/ClientNonUIFeatures.tsx
index d7944424c..148dc0693 100644
--- a/src/app/pages/client/ClientNonUIFeatures.tsx
+++ b/src/app/pages/client/ClientNonUIFeatures.tsx
@@ -26,6 +26,7 @@ import { settingsAtom } from '../../state/settings';
import { allInvitesAtom } from '../../state/room-list/inviteList';
import { useMatrixClient } from '../../hooks/useMatrixClient';
import { useHydrateMsgDrafts } from '../../hooks/useHydrateMsgDrafts';
+import { useSearchCacheInvalidation } from '../../utils/searchCacheInvalidation';
import {
getDirectRoomPath,
getHomeRoomPath,
@@ -722,14 +723,23 @@ function ReminderMonitor() {
if (!firedRef.current.has(key)) {
firedRef.current.add(key);
const room = mx.getRoom(r.roomId);
+ const roomName = room?.name ?? 'Unknown Room';
+ // Reminders for E2EE rooms carry no text (account data is server-
+ // readable), so resolve the body from the local timeline at fire time.
+ const localBody = room?.findEventById(r.eventId)?.getContent()?.body;
+ const body =
+ r.message ??
+ (typeof localBody === 'string' && localBody
+ ? localBody.slice(0, 120)
+ : `Reminder for a message in ${roomName}`);
const hashPath = mDirectsRef.current.has(r.roomId)
? getDirectRoomPath(r.roomId, r.eventId)
: getHomeRoomPath(r.roomId, r.eventId);
setToast({
id: `reminder-${key}`,
displayName: 'Reminder',
- body: r.message,
- roomName: room?.name ?? 'Unknown Room',
+ body,
+ roomName,
roomId: r.roomId,
hashPath,
});
@@ -896,10 +906,18 @@ function MsgDraftHydrator(): null {
return null;
}
+// Gitea #14 — keeps the opt-in persistent search cache from outliving the
+// plaintext it indexed (redactions + leaving/being banned from a room).
+function SearchCacheInvalidationFeature(): null {
+ useSearchCacheInvalidation();
+ return null;
+}
+
export function ClientNonUIFeatures({ children }: ClientNonUIFeaturesProps) {
return (
<>
+