diff --git a/js/background.js b/js/background.js index 105e8e71f..b2ff36189 100644 --- a/js/background.js +++ b/js/background.js @@ -1981,9 +1981,13 @@ // Public chat messages from ourselves should be outgoing message = await createSentMessage(data); } - } else { + } + + // All other messages should be incoming + if (!message) { message = await createMessage(data); } + const isDuplicate = await isMessageDuplicate(message); if (isDuplicate) { // RSS expects duplciates, so squelch log diff --git a/js/modules/loki_file_server_api.js b/js/modules/loki_file_server_api.js index 1bd5fbc51..571a8016b 100644 --- a/js/modules/loki_file_server_api.js +++ b/js/modules/loki_file_server_api.js @@ -105,6 +105,10 @@ class LokiFileServerInstance { } await Promise.all( authorisations.map(async auth => { + if (typeof auth !== 'object') { + return; + } + // only skip, if in secondary search mode if (isRequest && auth.secondaryDevicePubKey !== user.username) { // this is not the authorization we're looking for