fix: P0 post-deploy bug fixes from live testing
- EditHistoryModal: use raw fetch with /_matrix/client/v1/ path for relations API — Synapse only supports relations at v1, not v3 (fixes Sentry JAVASCRIPT-REACT-K / 404 error) - RoomViewHeader: remove useReportRoomSupported spec-version gate — Synapse 1.114+ has the endpoint but only advertises spec v1.12; button now always shows for non-creator, non-server-notice rooms - ReportRoomModal: handle M_UNRECOGNIZED/404 with "not supported by your homeserver" message - RoomNavItem: add isServerNotice guard to Room Settings in sidebar context menu (was only guarded in header three-dots menu) - initMatrix: bump setMaxListeners from 50 → 150 to prevent MaxListenersExceededWarning with large room lists - RoomProfile: save topic with formatted_body + format when markdown syntax is detected; add markdown hint below topic textarea Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -49,7 +49,6 @@ import { roomToUnreadAtom } from '../../state/room/roomToUnread';
|
||||
import { copyToClipboard } from '../../utils/dom';
|
||||
import { LeaveRoomPrompt } from '../../components/leave-room-prompt';
|
||||
import { useRoomAvatar, useLocalRoomName, useRoomTopic } from '../../hooks/useRoomMeta';
|
||||
import { useReportRoomSupported } from '../../hooks/useReportRoomSupported';
|
||||
import { ScreenSize, useScreenSizeContext } from '../../hooks/useScreenSize';
|
||||
import { stopPropagation } from '../../utils/keyboard';
|
||||
import { getMatrixToRoom } from '../../plugins/matrix-to';
|
||||
@@ -90,7 +89,6 @@ const RoomMenu = forwardRef<HTMLDivElement, RoomMenuProps>(({ room, requestClose
|
||||
|
||||
const permissions = useRoomPermissions(creators, powerLevels);
|
||||
const canInvite = permissions.action('invite', mx.getSafeUserId());
|
||||
const reportRoomSupported = useReportRoomSupported();
|
||||
const isServerNotice = room.getType() === 'm.server_notice';
|
||||
const isCreator = creators.has(mx.getSafeUserId());
|
||||
const notificationPreferences = useRoomsNotificationPreferencesContext();
|
||||
@@ -247,7 +245,7 @@ const RoomMenu = forwardRef<HTMLDivElement, RoomMenuProps>(({ room, requestClose
|
||||
</Box>
|
||||
<Line variant="Surface" size="300" />
|
||||
<Box direction="Column" gap="100" style={{ padding: config.space.S100 }}>
|
||||
{reportRoomSupported && !isServerNotice && !isCreator && (
|
||||
{!isServerNotice && !isCreator && (
|
||||
<MenuItem
|
||||
onClick={() => setReportRoomOpen(true)}
|
||||
variant="Critical"
|
||||
|
||||
Reference in New Issue
Block a user