Merge pull request #13 from Skylar-Tech/12-failed-logins-crash

Closes #12
This commit is contained in:
Skylar Sadlier 2021-08-30 11:54:13 -06:00 committed by GitHub
commit 3eab7f6d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,11 +136,13 @@ module.exports = function(RED) {
async function run() { async function run() {
if(node.e2ee){ if(node.e2ee){
await node.matrixClient.initCrypto(); node.matrixClient.initCrypto()
.catch((error) => node.error(error));
node.matrixClient.setGlobalErrorOnUnknownDevices(false); node.matrixClient.setGlobalErrorOnUnknownDevices(false);
} else {
} }
await node.matrixClient.startClient({ initialSyncLimit: 8 });
node.matrixClient.startClient({ initialSyncLimit: 8 })
.catch((error) => node.error(error));
} }
node.log("Connecting to Matrix server..."); node.log("Connecting to Matrix server...");