diff --git a/js/background.js b/js/background.js index 8d5ebd1f1..85f040d99 100644 --- a/js/background.js +++ b/js/background.js @@ -238,7 +238,7 @@ specialConvInited = true; }; - const initAPIs = async () => { + const initAPIs = () => { if (window.initialisedAPI) { return; } @@ -251,7 +251,7 @@ // If already exists we registered as a secondary device if (!window.lokiFileServerAPI) { window.lokiFileServerAPIFactory = new window.LokiFileServerAPI(ourKey); - window.lokiFileServerAPI = await window.lokiFileServerAPIFactory.establishHomeConnection( + window.lokiFileServerAPI = window.lokiFileServerAPIFactory.establishHomeConnection( window.getDefaultFileServer() ); } @@ -1468,7 +1468,7 @@ const ourKey = textsecure.storage.user.getNumber(); window.lokiMessageAPI = new window.LokiMessageAPI(ourKey); window.lokiFileServerAPIFactory = new window.LokiFileServerAPI(ourKey); - window.lokiFileServerAPI = await window.lokiFileServerAPIFactory.establishHomeConnection( + window.lokiFileServerAPI = window.lokiFileServerAPIFactory.establishHomeConnection( window.getDefaultFileServer() ); window.lokiPublicChatAPI = null; @@ -1488,7 +1488,7 @@ return; } - await initAPIs(); + initAPIs(); await initSpecialConversations(); messageReceiver = new textsecure.MessageReceiver( USERNAME, diff --git a/js/modules/loki_file_server_api.js b/js/modules/loki_file_server_api.js index 601ab2e9a..c38609467 100644 --- a/js/modules/loki_file_server_api.js +++ b/js/modules/loki_file_server_api.js @@ -291,14 +291,14 @@ class LokiFileServerFactoryAPI { this.servers = []; } - async establishHomeConnection(serverUrl) { + establishHomeConnection(serverUrl) { let thisServer = this.servers.find( server => server._server.baseServerUrl === serverUrl ); if (!thisServer) { thisServer = new LokiHomeServerInstance(this.ourKey); log.info(`Registering HomeServer ${serverUrl}`); - await thisServer.establishConnection(serverUrl); + thisServer.establishConnection(serverUrl); this.servers.push(thisServer); } return thisServer; diff --git a/ts/components/session/LeftPaneChannelSection.tsx b/ts/components/session/LeftPaneChannelSection.tsx index f7a9cdd08..c5131f448 100644 --- a/ts/components/session/LeftPaneChannelSection.tsx +++ b/ts/components/session/LeftPaneChannelSection.tsx @@ -406,7 +406,8 @@ export class LeftPaneChannelSection extends React.Component { return; } - await window.doCreateGroup(groupName, groupMembers); + const groupMemberIds = groupMembers.map(m => m.id); + await window.doCreateGroup(groupName, groupMemberIds); this.handleToggleOverlay(undefined); window.pushToast({