diff --git a/src/app/features/room/ThreadBrowser.tsx b/src/app/features/room/ThreadBrowser.tsx index 6d337f32b..cb3cd904b 100644 --- a/src/app/features/room/ThreadBrowser.tsx +++ b/src/app/features/room/ThreadBrowser.tsx @@ -14,7 +14,7 @@ import { toRem, } from 'folds'; import type { EventTimelineSet, MatrixEvent, Room, Thread } from '$types/matrix-sdk'; -import { NotificationCountType, RoomEvent, ThreadEvent } from '$types/matrix-sdk'; +import { EventType, NotificationCountType, RoomEvent, ThreadEvent } from '$types/matrix-sdk'; import { useAtomValue } from 'jotai'; import type { HTMLReactParserOptions } from 'html-react-parser'; import type { Opts as LinkifyOpts } from 'linkifyjs'; diff --git a/src/app/features/room/ThreadDrawer.tsx b/src/app/features/room/ThreadDrawer.tsx index 6be7e8f58..5f680cce5 100644 --- a/src/app/features/room/ThreadDrawer.tsx +++ b/src/app/features/room/ThreadDrawer.tsx @@ -410,13 +410,13 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra room.on(RoomEvent.Redaction, onRedaction); room.on(ThreadEvent.Update, onThreadUpdate); room.on(ThreadEvent.NewReply, onThreadUpdate); - room.on(MatrixEventEvent.Decrypted, onDecrypted); + mx.on(MatrixEventEvent.Decrypted, onDecrypted); return () => { mx.off(RoomEvent.Timeline, onTimeline); room.removeListener(RoomEvent.Redaction, onRedaction); room.removeListener(ThreadEvent.Update, onThreadUpdate); room.removeListener(ThreadEvent.NewReply, onThreadUpdate); - room.removeListener(MatrixEventEvent.Decrypted, onDecrypted); + mx.removeListener(MatrixEventEvent.Decrypted, onDecrypted); }; }, [mx, room, threadRootId]);