more tweaking to server consent flow and changing servers on preview
This commit is contained in:
+1
-10
@@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import {createEnum} from "./utils/enum.js";
|
||||
import {orderedUnique} from "./utils/unique.js";
|
||||
|
||||
const ROOMALIAS_PATTERN = /^#([^:]*):(.+)$/;
|
||||
const ROOMID_PATTERN = /^!([^:]*):(.+)$/;
|
||||
@@ -56,16 +57,6 @@ export const LinkKind = createEnum(
|
||||
"Event"
|
||||
)
|
||||
|
||||
function orderedUnique(array) {
|
||||
const copy = [];
|
||||
for (let i = 0; i < array.length; ++i) {
|
||||
if (i === 0 || array.lastIndexOf(array[i], i - 1) === -1) {
|
||||
copy.push(array[i]);
|
||||
}
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
export class Link {
|
||||
static parse(fragment) {
|
||||
if (!fragment) {
|
||||
|
||||
Reference in New Issue
Block a user