support matrix.to links (#1849)
authorAjay Bura <32841439+ajbura@users.noreply.github.com>
Tue, 30 Jul 2024 12:18:59 +0000 (17:48 +0530)
committerGitHub <noreply@github.com>
Tue, 30 Jul 2024 12:18:59 +0000 (22:18 +1000)
commit5058136737e177a5cabecc8b53b489eaabc23429
tree79e41a73fd06313d2170d9e538bce1d7e942914f
parent74dc76e22e5709bef399c0acb6054840ae08d830
support matrix.to links (#1849)

* support room via server params and eventId

* change copy link to matrix.to links

* display matrix.to links in messages as pill and stop generating url previews for them

* improve editor mention to include viaServers and eventId

* fix mention custom attributes

* always try to open room in current space

* jump to latest remove target eventId from url

* add create direct search options to open/create dm with url
38 files changed:
src/app/components/RenderMessageContent.tsx
src/app/components/editor/autocomplete/RoomMentionAutocomplete.tsx
src/app/components/editor/input.ts
src/app/components/editor/output.ts
src/app/components/editor/slate.d.ts
src/app/components/editor/utils.ts
src/app/components/message/RenderBody.tsx
src/app/components/room-card/RoomCard.tsx
src/app/features/join-before-navigate/JoinBeforeNavigate.tsx
src/app/features/message-search/SearchResultGroup.tsx
src/app/features/room-nav/RoomNavItem.tsx
src/app/features/room/RoomTimeline.tsx
src/app/features/room/RoomTombstone.tsx
src/app/features/room/RoomViewHeader.tsx
src/app/features/room/message/Message.tsx
src/app/hooks/router/useSearchParamsViaServers.ts [new file with mode: 0644]
src/app/hooks/useMentionClickHandler.ts [new file with mode: 0644]
src/app/hooks/useRoomNavigate.ts
src/app/hooks/useSpoilerClickHandler.ts [new file with mode: 0644]
src/app/molecules/space-add-existing/SpaceAddExisting.jsx
src/app/pages/Router.tsx
src/app/pages/client/direct/DirectCreate.tsx [new file with mode: 0644]
src/app/pages/client/direct/RoomProvider.tsx
src/app/pages/client/direct/index.ts
src/app/pages/client/home/RoomProvider.tsx
src/app/pages/client/inbox/Notifications.tsx
src/app/pages/client/sidebar/SpaceTabs.tsx
src/app/pages/client/space/RoomProvider.tsx
src/app/pages/client/space/Space.tsx
src/app/pages/client/space/SpaceProvider.tsx
src/app/pages/pathSearchParam.ts [new file with mode: 0644]
src/app/pages/paths.ts
src/app/plugins/matrix-to.ts [new file with mode: 0644]
src/app/plugins/react-custom-html-parser.tsx
src/app/plugins/via-servers.ts [new file with mode: 0644]
src/app/utils/keyboard.ts
src/app/utils/matrix.ts
src/util/matrixUtil.js