From 685d91d41bbd82c60fa4d61e1da06182dffdb33e Mon Sep 17 00:00:00 2001 From: Lotus Bot Date: Fri, 22 May 2026 18:03:55 -0400 Subject: [PATCH] fix: restore mx declarations to all components in Message.tsx Automated cleanup removed const mx = useMatrixClient() from 3 more components that use it (MessagePinItem, Message, Event) in addition to the 2 fixed in the previous hotfix. Root cause: the cleanup script used substring matching on indentation which removed declarations at any indent level, not just the one targeted unused variable. All 5 components that call mx.* now have their declarations restored. Co-Authored-By: Claude Sonnet 4.6 --- src/app/features/room/message/Message.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index 261131b06..95db1db20 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -407,6 +407,7 @@ export const MessagePinItem = as< onClose?: () => void; } >(({ room, mEvent, onClose, ...props }, ref) => { + const mx = useMatrixClient(); const pinnedEvents = useRoomPinnedEvents(room); const isPinned = pinnedEvents.includes(mEvent.getId() ?? ''); const handlePin = () => { @@ -767,6 +768,7 @@ export const Message = React.memo( }, ref, ) => { + const mx = useMatrixClient(); const useAuthentication = useMediaAuthentication(); const senderId = mEvent.getSender() ?? ''; const readPositions = useReadPositions(); @@ -1272,6 +1274,7 @@ export const Event = React.memo( ref, ) => { const [hover, setHover] = useState(false); + const mx = useMatrixClient(); const { hoverProps } = useHover({ onHoverChange: setHover }); const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setHover }); const [menuAnchor, setMenuAnchor] = useState();