From 33aa190c5b01bd99c4317eb5fd63519af44a1071 Mon Sep 17 00:00:00 2001 From: Mikunj Varsani Date: Wed, 12 Feb 2020 14:45:34 +1100 Subject: [PATCH 1/2] Fix friend request for background messages not triggering friend request logic --- libtextsecure/outgoing_message.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libtextsecure/outgoing_message.js b/libtextsecure/outgoing_message.js index 00e4be293..3749b2e1b 100644 --- a/libtextsecure/outgoing_message.js +++ b/libtextsecure/outgoing_message.js @@ -484,6 +484,7 @@ OutgoingMessage.prototype = { sourceDevice: 1, content, pubKey: devicePubKey, + isFriendRequest: enableFallBackEncryption, }; }) ) @@ -504,10 +505,7 @@ OutgoingMessage.prototype = { this.timestamp, outgoingObject.ttl ); - if ( - outgoingObject.type === - textsecure.protobuf.Envelope.Type.FRIEND_REQUEST - ) { + if (outgoingObject.isFriendRequest) { const conversation = ConversationController.get(destination); if (conversation) { // Redundant for primary device but marks secondary devices as pending From 10a4f13bc5ad2aa823b6cf670152636e9d8a1561 Mon Sep 17 00:00:00 2001 From: Mikunj Varsani Date: Wed, 12 Feb 2020 14:51:39 +1100 Subject: [PATCH 2/2] Linting --- js/modules/loki_app_dot_net_api.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/modules/loki_app_dot_net_api.js b/js/modules/loki_app_dot_net_api.js index 293d6a522..c9664abef 100644 --- a/js/modules/loki_app_dot_net_api.js +++ b/js/modules/loki_app_dot_net_api.js @@ -614,7 +614,9 @@ class LokiAppDotNetServerAPI { `serverRequest ${mode} error`, e.code, e.message, - `json: ${txtResponse}`, 'attempting connection to', url + `json: ${txtResponse}`, + 'attempting connection to', + url ); } else { log.info(