mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
lint
This commit is contained in:
parent
8e0f8400bc
commit
c269984bb7
@ -73,8 +73,7 @@ import { initializeSentry, initializeGlobalPerformanceMetrics, patchMatrixClient
|
|||||||
const accessToken = await Promise.resolve(storage.readValue("access_token"));
|
const accessToken = await Promise.resolve(storage.readValue("access_token"));
|
||||||
if (accessToken) {
|
if (accessToken) {
|
||||||
client = new MatrixClient(config.homeserverUrl, accessToken, storage, cryptoStorage);
|
client = new MatrixClient(config.homeserverUrl, accessToken, storage, cryptoStorage);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
const auth = new MatrixAuth(config.homeserverUrl)
|
const auth = new MatrixAuth(config.homeserverUrl)
|
||||||
const tempClient = await auth.passwordLogin(config.encryption.username, config.encryption.password)
|
const tempClient = await auth.passwordLogin(config.encryption.username, config.encryption.password)
|
||||||
client = new MatrixClient(config.homeserverUrl, tempClient.accessToken, storage, cryptoStorage);
|
client = new MatrixClient(config.homeserverUrl, tempClient.accessToken, storage, cryptoStorage);
|
||||||
|
@ -130,7 +130,7 @@ async function registerNewTestUser(homeserver: string, options: RegistrationOpti
|
|||||||
*
|
*
|
||||||
* @returns A new `MatrixClient` session for a unique test user.
|
* @returns A new `MatrixClient` session for a unique test user.
|
||||||
*/
|
*/
|
||||||
export async function newTestUser(homeserver: string, options: RegistrationOptions, encrypted: boolean = false): Promise<MatrixClient> {
|
export async function newTestUser(homeserver: string, options: RegistrationOptions, encrypted = false): Promise<MatrixClient> {
|
||||||
const accessToken = await registerNewTestUser(homeserver, options);
|
const accessToken = await registerNewTestUser(homeserver, options);
|
||||||
let client;
|
let client;
|
||||||
if (encrypted) {
|
if (encrypted) {
|
||||||
|
Loading…
Reference in New Issue
Block a user