Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay committed Sep 30, 2024
1 parent 8e0f840 commit c269984
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ import { initializeSentry, initializeGlobalPerformanceMetrics, patchMatrixClient
const accessToken = await Promise.resolve(storage.readValue("access_token"));
if (accessToken) {
client = new MatrixClient(config.homeserverUrl, accessToken, storage, cryptoStorage);
}
else {
} else {
const auth = new MatrixAuth(config.homeserverUrl)
const tempClient = await auth.passwordLogin(config.encryption.username, config.encryption.password)
client = new MatrixClient(config.homeserverUrl, tempClient.accessToken, storage, cryptoStorage);
Expand Down
2 changes: 1 addition & 1 deletion test/integration/clientHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async function registerNewTestUser(homeserver: string, options: RegistrationOpti
*
* @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);
let client;
if (encrypted) {
Expand Down

0 comments on commit c269984

Please sign in to comment.