diff --git a/src/components/left/main/Chat.tsx b/src/components/left/main/Chat.tsx index ecea176ad..5586f615c 100644 --- a/src/components/left/main/Chat.tsx +++ b/src/components/left/main/Chat.tsx @@ -125,6 +125,7 @@ const Chat: FC = ({ openChat, focusLastMessage, loadTopics, + openForumPanel, } = getActions(); const { isMobile } = useAppLayout(); @@ -155,12 +156,17 @@ const Chat: FC = ({ }); const handleClick = useCallback(() => { + if (isForum) { + openForumPanel({ chatId }); + return; + } + openChat({ id: chatId, shouldReplaceHistory: true }, { forceOnHeavyAnimation: true }); if (isSelected && canScrollDown) { focusLastMessage(); } - }, [openChat, chatId, isSelected, canScrollDown, focusLastMessage]); + }, [isForum, openChat, chatId, isSelected, canScrollDown, openForumPanel, focusLastMessage]); const handleDragEnter = useCallback((e) => { e.preventDefault();