diff --git a/spec/unit/crypto/algorithms/megolm.spec.js b/spec/unit/crypto/algorithms/megolm.spec.js index d20f6e9cd..94e4d8169 100644 --- a/spec/unit/crypto/algorithms/megolm.spec.js +++ b/spec/unit/crypto/algorithms/megolm.spec.js @@ -7,23 +7,10 @@ import {OlmDevice} from "../../../../src/crypto/OlmDevice"; import {Crypto} from "../../../../src/crypto"; import {logger} from "../../../../src/logger"; import {MatrixEvent} from "../../../../src/models/event"; +import {TestClient} from "../../../TestClient"; +import {Room} from "../../../../src/models/room"; +import * as olmlib from "../../../../src/crypto/olmlib"; -<<<<<<< HEAD -======= -import sdk from '../../../..'; -import algorithms from '../../../../lib/crypto/algorithms'; -import MemoryCryptoStore from '../../../../lib/crypto/store/memory-crypto-store.js'; -import MockStorageApi from '../../../MockStorageApi'; -import testUtils from '../../../test-utils'; -import OlmDevice from '../../../../lib/crypto/OlmDevice'; -import Crypto from '../../../../lib/crypto'; -import logger from '../../../../lib/logger'; -import TestClient from '../../../TestClient'; -import olmlib from '../../../../lib/crypto/olmlib'; -import Room from '../../../../lib/models/room'; - -const MatrixEvent = sdk.MatrixEvent; ->>>>>>> develop const MegolmDecryption = algorithms.DECRYPTION_CLASSES['m.megolm.v1.aes-sha2']; const MegolmEncryption = algorithms.ENCRYPTION_CLASSES['m.megolm.v1.aes-sha2']; diff --git a/src/client.js b/src/client.js index 172149feb..798f924fc 100644 --- a/src/client.js +++ b/src/client.js @@ -22,7 +22,6 @@ limitations under the License. * This is an internal module. See {@link MatrixClient} for the public class. * @module client */ -<<<<<<< HEAD import url from "url"; import {EventEmitter} from "events"; @@ -48,37 +47,7 @@ import {decodeRecoveryKey} from './crypto/recoverykey'; import {keyFromAuthData} from './crypto/key_passphrase'; import {randomString} from './randomstring'; import {PushProcessor} from "./pushprocessor"; -======= -const EventEmitter = require("events").EventEmitter; -const url = require('url'); - -const httpApi = require("./http-api"); -const MatrixEvent = require("./models/event").MatrixEvent; -const EventStatus = require("./models/event").EventStatus; -const EventTimeline = require("./models/event-timeline"); -const SearchResult = require("./models/search-result"); -const StubStore = require("./store/stub"); -const webRtcCall = require("./webrtc/call"); -const utils = require("./utils"); -const contentRepo = require("./content-repo"); -const Filter = require("./filter"); -const SyncApi = require("./sync"); -const MatrixBaseApis = require("./base-apis"); -const MatrixError = httpApi.MatrixError; -const ContentHelpers = require("./content-helpers"); -const olmlib = require("./crypto/olmlib"); - -import ReEmitter from './ReEmitter'; -import RoomList from './crypto/RoomList'; -import logger from './logger'; - -import Crypto from './crypto'; -import { isCryptoAvailable } from './crypto'; -import { decodeRecoveryKey } from './crypto/recoverykey'; -import { keyFromAuthData } from './crypto/key_passphrase'; -import { randomString } from './randomstring'; -import { encodeBase64, decodeBase64 } from '../lib/crypto/olmlib'; ->>>>>>> develop +import {encodeBase64, decodeBase64} from "./crypto/olmlib"; const SCROLLBACK_DELAY_MS = 3000; export const CRYPTO_ENABLED = isCryptoAvailable(); diff --git a/src/crypto/OlmDevice.js b/src/crypto/OlmDevice.js index f457a4e56..b3a73399b 100644 --- a/src/crypto/OlmDevice.js +++ b/src/crypto/OlmDevice.js @@ -1,11 +1,7 @@ /* Copyright 2016 OpenMarket Ltd Copyright 2017, 2019 New Vector Ltd -<<<<<<< HEAD -Copyright 2019 The Matrix.org Foundation C.I.C. -======= -Copyright 2020 The Matrix.org Foundation C.I.C. ->>>>>>> develop +Copyright 2019, 2020 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/utils.js b/src/utils.js index 3d43945e2..b0cb07311 100644 --- a/src/utils.js +++ b/src/utils.js @@ -645,11 +645,8 @@ export function isNumber(value) { */ export function removeHiddenChars(str) { return unhomoglyph(str.normalize('NFD').replace(removeHiddenCharsRegex, '')); -<<<<<<< HEAD } -const removeHiddenCharsRegex = /[\u200B-\u200D\u0300-\u036f\uFEFF\s]/g; -======= -}; + // Regex matching bunch of unicode control characters and otherwise misleading/invisible characters. // Includes: // various width spaces U+2000 - U+200D @@ -658,7 +655,6 @@ const removeHiddenCharsRegex = /[\u200B-\u200D\u0300-\u036f\uFEFF\s]/g; // Combining characters U+0300 - U+036F // Zero width no-break space (BOM) U+FEFF const removeHiddenCharsRegex = /[\u2000-\u200F\u202A-\u202F\u0300-\u036f\uFEFF\s]/g; ->>>>>>> develop export function escapeRegExp(string) { return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");