Fix space mention (#1439)

* open space on space mention click

* fix styles

* fix message options sticks

* revert last changes
This commit is contained in:
Ajay Bura 2023-10-07 20:21:35 +11:00 committed by GitHub
parent 1bdb7f4e3a
commit 13573f4b3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -86,7 +86,12 @@ import {
} from '../../utils/room';
import { useSetting } from '../../state/hooks/settings';
import { settingsAtom } from '../../state/settings';
import { openJoinAlias, openProfileViewer, selectRoom } from '../../../client/action/navigation';
import {
openJoinAlias,
openProfileViewer,
selectRoom,
selectSpace,
} from '../../../client/action/navigation';
import { useForceUpdate } from '../../hooks/useForceUpdate';
import { parseGeoUri, scaleYDimension } from '../../utils/common';
import { useMatrixEventRenderer } from '../../hooks/useMatrixEventRenderer';
@ -536,7 +541,8 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
return;
}
if (isRoomId(mentionId) && mx.getRoom(mentionId)) {
selectRoom(mentionId);
if (mx.getRoom(mentionId)?.isSpaceRoom()) selectSpace(mentionId);
else selectRoom(mentionId);
return;
}
openJoinAlias(mentionId);