From e7569a569cdbb4ab3449ca76b2c60289aba242f0 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 7 Jul 2020 11:56:47 +1000 Subject: [PATCH] fix-unicode-windows-error --- _locales/en/messages.json | 4 ++-- ts/receiver/dataMessage.ts | 8 +++----- ts/session/protocols/SessionProtocol.ts | 2 -- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index cb18d4063..b07b94851 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -222,7 +222,7 @@ "description": "Message shown if the import went wrong; first paragraph" }, "importErrorSecond": { - "message": "If these steps don't work for you, please submit a debug log (View 🠖 Debug Log) so that we can help you get migrated!", + "message": "If these steps don't work for you, please submit a debug log (View -> Debug Log) so that we can help you get migrated!", "description": "Message shown if the import went wrong; second paragraph" }, "importAgain": { @@ -872,7 +872,7 @@ "message": "Device linking request received." }, "devicePairingRequestReceivedNoListenerDescription": { - "message": "Device linking request received but you are not on the device linking screen. \nGo to Settings 🠖 Device 🠖 Link New Device." + "message": "Device linking request received but you are not on the device linking screen. \nGo to Settings > Device > Link New Device." }, "waitingForDeviceToRegister": { "message": "Waiting for device to register..." diff --git a/ts/receiver/dataMessage.ts b/ts/receiver/dataMessage.ts index 06116b058..653075b37 100644 --- a/ts/receiver/dataMessage.ts +++ b/ts/receiver/dataMessage.ts @@ -632,11 +632,9 @@ export async function handleMessageEvent(event: any): Promise { conversationId = primarySource.key; } - // be sure to call this one with conversationId. because we might need to create the primary conversation from a message of a secondary device - const conversation = await window.ConversationController.getOrCreateAndWait( - conversationId, - type - ); + // the conversation with the primary device of that source (can be the same as conversationOrigin) + const conversation = window.ConversationController.get(conversationId); + conversation.queueJob(() => { handleMessageJob( msg, diff --git a/ts/session/protocols/SessionProtocol.ts b/ts/session/protocols/SessionProtocol.ts index 0fe52f915..45b3673f6 100644 --- a/ts/session/protocols/SessionProtocol.ts +++ b/ts/session/protocols/SessionProtocol.ts @@ -105,8 +105,6 @@ export class SessionProtocol { public static async sendSessionRequestIfNeeded( pubkey: PubKey ): Promise { - const { ConversationController } = window; - if ( (await SessionProtocol.hasSession(pubkey)) || (await SessionProtocol.hasSentSessionRequest(pubkey))