diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index 52e8f6236..5333f28e3 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -909,7 +909,7 @@ const RocketChat = { methodCall(...args) { return new Promise(async(resolve, reject) => { try { - const result = await this.sdk.methodCall(...args, this.code); + const result = await this.sdk.methodCall(...args, this.code || ''); return resolve(result); } catch (e) { if (e.error && (e.error === 'totp-required' || e.error === 'totp-invalid')) {