This repository was archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 812
Allows search to recognize full room links #8275
Merged
artcodespace
merged 33 commits into
matrix-org:develop
from
bolu-tife:fix/matrix-link-search
May 9, 2023
Merged
Changes from 11 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
97bcf1d
fix matrix search link
bolu-tife 604a6ed
fix matrix search link
bolu-tife 9ba6051
fix: allow full link search
bolu-tife 9d10d95
fix: allow full link search on new search feature
bolu-tife 85c9d66
improve transformSearchTerm function
bolu-tife 225bcab
improve transformSearchTerm function
bolu-tife b0f2b91
Merge branch 'develop' into fix/matrix-link-search
bolu-tife 4c6e4c0
add review changes
bolu-tife bef2ac5
Signed-off-by: Boluwatife Omosowon <[email protected]>
bolu-tife a33c486
Merge branch 'develop' into fix/matrix-link-search
bolu-tife 1dba919
add angle brackets to copyright email title
bolu-tife c26fbf2
removed extra space
bolu-tife bd46c1e
merged develop into branch
3adaca0
Update src/utils/SearchInput.ts
bolu-tife 201679f
Merge branch 'fix/matrix-link-search' of https://github.com/bolu-tife…
2dfea11
fixed spolight dialog search for room and user links
23b9f10
added tests for transformSearchTerm
897a099
removed transformSearchTerm from room search bar
db0a434
Merge branch 'develop' into fix/matrix-link-search
bolu-tife 2380985
Merge branch 'matrix-org:develop' into fix/matrix-link-search
bolu-tife 9877e29
replaces two test cases to one that should return the primaryEntityId…
818fe72
Merge branch 'develop' into fix/matrix-link-search
bolu-tife 67da64d
Merge branch 'develop' into fix/matrix-link-search
bolu-tife a8364e6
corrected ts issues
49fcb95
Merge branch 'fix/matrix-link-search' of https://github.com/bolu-tife…
d63b7e8
Merge branch 'develop' into fix/matrix-link-search
bolu-tife f42aea9
changed type of transformSearchTerm to string
a973adf
changed return value from empty string to the original search term if…
89d7636
changed return value from empty string to the original search term if…
377fd93
refactored transformSearchTerm and added a new test case
bd055d5
rewrote transformSearchTerm doc
682d3f8
changed mocked return values of test case - should return the origina…
825e1ce
lint corrections
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| Copyright 2022 Boluwatife Omosowon <[email protected]> | ||
bolu-tife marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| import { parsePermalink } from "../utils/permalinks/Permalinks"; | ||
|
|
||
| /** | ||
| * Return the roomId or alias of an element or matrix room link | ||
| * E.g https://matrix.to/#/#element-dev:matrix.org returns #element-dev:matrix.org | ||
| * @param {string} searchTerm The searchterm . | ||
bolu-tife marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * @returns {string} Tranforms the string to its roomid or alias if it is a matrix or element link. | ||
| */ | ||
| export function transformSearchTerm(searchTerm: string): string { | ||
| const parseLink = parsePermalink(searchTerm); | ||
| if (parseLink) return parseLink.roomIdOrAlias; | ||
| return searchTerm; | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.