matrix-react-sdk
Version:
SDK for matrix.org using React
10 lines (9 loc) • 468 B
TypeScript
/**
* Returns the primaryEntityId(roomIdOrAlias or userId) if the search term
* is a permalink and the primaryEntityId is not null. Otherwise, it returns
* the original search term.
* E.g https://matrix.to/#/#element-dev:matrix.org returns #element-dev:matrix.org
* @param {string} searchTerm The search term.
* @returns {string} The roomId, alias, userId, or the original search term
*/
export declare function transformSearchTerm(searchTerm: string): string;