From 6015349ee1b93c0b5de4caef9ba524f1e19ccf8d Mon Sep 17 00:00:00 2001 From: Gerzon Z Date: Tue, 8 Mar 2022 11:38:46 -0400 Subject: [PATCH] fix: login error --- app/lib/rocketchat/services/connect.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/lib/rocketchat/services/connect.ts b/app/lib/rocketchat/services/connect.ts index 7eabd29c2..e7f24d0a8 100644 --- a/app/lib/rocketchat/services/connect.ts +++ b/app/lib/rocketchat/services/connect.ts @@ -25,7 +25,6 @@ import { updatePermission } from '../../../actions/permissions'; import EventEmitter from '../../../utils/events'; import { updateSettings } from '../../../actions/settings'; import defaultSettings from '../../../constants/settings'; -import getSettings from '../../methods/getSettings'; interface IServices { [index: string]: string | boolean; @@ -87,7 +86,7 @@ function connect( EventEmitter.emit('INQUIRY_UNSUBSCRIBE'); sdk.initialize(server); - getSettings(); + this.getSettings(); sdk.current .connect() @@ -333,7 +332,7 @@ function loginTOTP(params: ICredentials, loginEmailPassword?: boolean, isFromWeb }); } -function loginWithPassword({ user, password }: { user: string; password: string }) { +function loginWithPassword({ user, password }: { user: string; password: string }): Promise { let params: ICredentials = { user, password }; const state = store.getState(); @@ -433,7 +432,7 @@ async function getWebsocketInfo({ server }: { server: string }) { } } - sdk.current.disconnect(); + sdk.disconnect(); return { success: true