diff --git a/src/app/components/message/modals/Options.tsx b/src/app/components/message/modals/Options.tsx
index a245bd096..25489401b 100644
--- a/src/app/components/message/modals/Options.tsx
+++ b/src/app/components/message/modals/Options.tsx
@@ -598,6 +598,7 @@ export type OptionMenuProps = {
onEditId?: (eventId?: string) => void;
onReproxyId?: (profileId?: string) => void;
hideReadReceipts?: boolean;
+ hideReplyButton?: boolean;
showDeveloperTools?: boolean;
canPinEvent?: boolean;
canDelete?: boolean;
@@ -622,6 +623,7 @@ function OptionMenu({
onReplyClick,
onEditId,
hideReadReceipts,
+ hideReplyButton,
showDeveloperTools,
canPinEvent,
canDelete,
@@ -808,20 +810,22 @@ function OptionMenu({
{isGif && isModal && (
)}
-
+ {!hideReplyButton && (
+
+ )}
{!isThreadedMessage && (
)}
-
-
-
- {(promptLeave, setPromptLeave) => (
- <>
-
- {promptLeave && (
- setPromptLeave(false)}
- />
- )}
- >
- )}
-
-
);
}
diff --git a/src/app/features/forum/ForumThreadItem.tsx b/src/app/features/forum/ForumThreadItem.tsx
index 192f02e1a..d63fc07ba 100644
--- a/src/app/features/forum/ForumThreadItem.tsx
+++ b/src/app/features/forum/ForumThreadItem.tsx
@@ -3,13 +3,13 @@ import type { Thread } from 'matrix-js-sdk/lib/models/thread';
import { useAtomValue } from 'jotai';
import { useMatrixClient } from '$hooks/useMatrixClient';
import { useMediaAuthentication } from '$hooks/useMediaAuthentication';
-import { getMemberAvatarMxc, getMemberDisplayName } from '$utils/room';
+import { getMemberAvatarMxc, getMemberDisplayName } from '$utils/room/display';
import { getMxIdLocalPart, mxcUrlToHttp } from '$utils/matrix';
import { UserAvatar } from '$components/user-avatar';
import { nicknamesAtom } from '$state/nicknames';
import type { ThreadRootItemProps } from '$features/room/ThreadRootItem';
import { ThreadRootItem } from '$features/room/ThreadRootItem';
-import { getThreadReplyEvents } from '$features/room/ThreadDrawer';
+import { getThreadReplyEvents } from '$utils/room/relations';
import * as css from './ForumView.css';
type ForumThreadItemProps = ThreadRootItemProps & {
diff --git a/src/app/features/forum/ForumView.tsx b/src/app/features/forum/ForumView.tsx
index 5d908cbc6..da4402c33 100644
--- a/src/app/features/forum/ForumView.tsx
+++ b/src/app/features/forum/ForumView.tsx
@@ -14,7 +14,7 @@ import { useMatrixClient } from '$hooks/useMatrixClient';
import { Page, PageContent, PageContentCenter, PageHeroSection } from '$components/page';
import { CaretUp, Chats, composerIcon, sizedIcon } from '$components/icons/phosphor';
import { MembersDrawer } from '$features/room/MembersDrawer';
-import { ThreadDrawer, getThreadReplyEvents } from '$features/room/ThreadDrawer';
+import { ThreadDrawer } from '$features/room/ThreadDrawer';
import { useSetting } from '$state/hooks/settings';
import { ScreenSize, useScreenSizeContext } from '$hooks/useScreenSize';
import { settingsAtom } from '$state/settings';
@@ -26,7 +26,7 @@ import { PowerLevelsContextProvider, usePowerLevels } from '$hooks/usePowerLevel
import { roomIdToOpenThreadAtomFamily } from '$state/room/roomToOpenThread';
import { useMediaAuthentication } from '$hooks/useMediaAuthentication';
import { useRoomMembers } from '$hooks/useRoomMembers';
-import { reactionOrEditEvent } from '$utils/room';
+import { getThreadReplyEvents, reactionOrEditEvent } from '$utils/room/relations';
import { mxcUrlToHttp, toggleReaction } from '$utils/matrix';
import { useStateEvent } from '$hooks/useStateEvent';
import { useRoomCreators } from '$hooks/useRoomCreators';
@@ -341,6 +341,7 @@ export function ForumView() {
room.roomId,
undefined,
userId,
+ undefined,
evt.currentTarget.getBoundingClientRect()
);
},
@@ -358,6 +359,7 @@ export function ForumView() {
room.roomId,
undefined,
userId,
+ undefined,
evt.currentTarget.getBoundingClientRect()
);
},
@@ -467,7 +469,6 @@ export function ForumView() {
editor={editor}
roomId={room.roomId}
fileDropContainerRef={roomViewRef}
- showUploadCardBottom
/>
)}
{!canMessage && (
diff --git a/src/app/features/lobby/SpaceItem.tsx b/src/app/features/lobby/SpaceItem.tsx
index 84d1b11a2..b1219309d 100644
--- a/src/app/features/lobby/SpaceItem.tsx
+++ b/src/app/features/lobby/SpaceItem.tsx
@@ -270,16 +270,6 @@ function AddRoomButton({ item }: { item: HierarchyItem }) {
>
New Room
-
diff --git a/src/app/features/room/ThreadRootItem.tsx b/src/app/features/room/ThreadRootItem.tsx
index 84b139129..11697c54e 100644
--- a/src/app/features/room/ThreadRootItem.tsx
+++ b/src/app/features/room/ThreadRootItem.tsx
@@ -8,7 +8,8 @@ import type { HTMLReactParserOptions } from 'html-react-parser';
import type { Opts as LinkifyOpts } from 'linkifyjs';
import { Image } from '$components/media';
import { ImageViewer } from '$components/image-viewer';
-import { getEditedEvent, getEventReactions, getMemberDisplayName } from '$utils/room';
+import { getMemberDisplayName } from '$utils/room/display';
+import { getEditedEvent, getEventReactions } from '$utils/room/relations';
import { getMxIdLocalPart } from '$utils/matrix';
import { ImageContent, MSticker, RedactedContent, Reply } from '$components/message';
import { RenderMessageContent } from '$components/RenderMessageContent';
diff --git a/src/app/pages/pathUtils.ts b/src/app/pages/pathUtils.ts
index 7cc514914..124201e4b 100644
--- a/src/app/pages/pathUtils.ts
+++ b/src/app/pages/pathUtils.ts
@@ -33,6 +33,9 @@ import {
NAVIGATE_PATH,
PROFILE_PATH,
INBOX_BOOKMARKS_PATH,
+ HOME_ROOM_FORUM_PATH,
+ DIRECT_ROOM_FORUM_PATH,
+ SPACE_ROOM_FORUM_PATH,
} from './paths';
export const joinPathComponent = (path: Path): string => path.pathname + path.search + path.hash;
@@ -108,6 +111,9 @@ export const getHomeRoomPath = (roomIdOrAlias: string, eventId?: string): string
return generatePath(HOME_ROOM_PATH, params);
};
+export const getHomeForumPath = (roomIdOrAlias: string): string =>
+ generatePath(HOME_ROOM_FORUM_PATH, { roomIdOrAlias: encodeURIComponent(roomIdOrAlias) });
+
export const getDirectPath = (): string => DIRECT_PATH;
export const getDirectCreatePath = (): string => DIRECT_CREATE_PATH;
export const getDirectRoomPath = (roomIdOrAlias: string, eventId?: string): string => {
@@ -119,6 +125,9 @@ export const getDirectRoomPath = (roomIdOrAlias: string, eventId?: string): stri
return generatePath(DIRECT_ROOM_PATH, params);
};
+export const getDirectForumPath = (roomIdOrAlias: string): string =>
+ generatePath(DIRECT_ROOM_FORUM_PATH, { roomIdOrAlias: encodeURIComponent(roomIdOrAlias) });
+
export const getSpacePath = (spaceIdOrAlias: string): string => {
const params = {
spaceIdOrAlias: encodeURIComponent(spaceIdOrAlias),
@@ -151,6 +160,11 @@ export const getSpaceRoomPath = (
return generatePath(SPACE_ROOM_PATH, params);
};
+export const getSpaceForumPath = (spaceIdOrAlias: string, roomIdOrAlias: string): string =>
+ generatePath(SPACE_ROOM_FORUM_PATH, {
+ spaceIdOrAlias: encodeURIComponent(spaceIdOrAlias),
+ roomIdOrAlias: encodeURIComponent(roomIdOrAlias),
+ });
export const getExplorePath = (): string => EXPLORE_PATH;
export const getExploreFeaturedPath = (): string => EXPLORE_FEATURED_PATH;