diff --git a/js/models/conversations.js b/js/models/conversations.js index aec9987f9..eac6a69af 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -649,7 +649,7 @@ ); }, async updateVerified() { - console.log('[vince] conversations.js --> updateVerified()'); + // console.log('[vince] conversations.js --> updateVerified()'); if (this.isPrivate()) { await this.initialPromise; @@ -856,7 +856,7 @@ return this.get('friendRequestStatus'); }, async getPrimaryConversation() { - console.log('[vince] conversation.js --> getPrimaryConversation'); + // console.log('[vince] conversation.js --> getPrimaryConversation'); if (!this.isSecondaryDevice()) { // This is already the primary conversation @@ -875,7 +875,7 @@ return this; }, async updateTextInputState() { - console.log('[vince] conversation.js --> updateTextInputState'); + // console.log('[vince] conversation.js --> updateTextInputState'); if (this.isRss()) { // or if we're an rss conversation, disable it @@ -926,7 +926,7 @@ return this.get('primaryDevicePubKey') || this.id; }, async setSecondaryStatus(newStatus, primaryDevicePubKey) { - console.log('[vince] conversation.js --> setSecondaryStatus'); + // console.log('[vince] conversation.js --> setSecondaryStatus'); if (this.get('secondaryStatus') !== newStatus) { this.set({ @@ -939,7 +939,7 @@ } }, async setFriendRequestStatus(newStatus, options = {}) { - console.log('[vince] conversation.js --> setFriendRequestStatus'); + // console.log('[vince] conversation.js --> setFriendRequestStatus'); const { blockSync } = options; // Ensure that the new status is a valid FriendStatusEnum value diff --git a/js/modules/signal.js b/js/modules/signal.js index eb719836e..04bcb5874 100644 --- a/js/modules/signal.js +++ b/js/modules/signal.js @@ -235,7 +235,7 @@ function initializeMigrations({ logger, }), upgradeMessageSchema: (message, options = {}) => { - console.log('[vince] signal.js --> upgradeMessageSchema'); + // console.log('[vince] signal.js --> upgradeMessageSchema'); const { maxVersion } = options; diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index f7b958dba..4180eae77 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -1629,7 +1629,7 @@ }, showSendConfirmationDialog(e, contacts) { - console.log('[vince] conversation_view.js --> showSendConfirmationDialog'); + // console.log('[vince] conversation_view.js --> showSendConfirmationDialog'); let message; const isUnverified = this.model.isUnverified(); @@ -2481,7 +2481,7 @@ !event.ctrlKey ) { - console.log('[vince] conversation_view.hs --> handleInputEvent:', Date.now()); + // console.log('[vince] conversation_view.hs --> handleInputEvent:', Date.now()); // enter pressed - submit the form now event.preventDefault(); diff --git a/libtextsecure/outgoing_message.js b/libtextsecure/outgoing_message.js index 5feb6d648..70fc43e3a 100644 --- a/libtextsecure/outgoing_message.js +++ b/libtextsecure/outgoing_message.js @@ -122,8 +122,13 @@ OutgoingMessage.prototype = { libloki.storage .getAllDevicePubKeysForPrimaryPubKey(number) // Don't send to ourselves - .then(devicesPubKeys => - devicesPubKeys.filter(pubKey => pubKey !== ourNumber) + .then(devicesPubKeys => { + console.log('[vince] devicesPubKeys should display for B1 and B2', devicesPubKeys); + console.log('[vince] devicesPubKeys:', devicesPubKeys); + + return devicesPubKeys.filter(pubKey => pubKey !== ourNumber) + + } ) .then(devicesPubKeys => { if (devicesPubKeys.length === 0) { @@ -315,6 +320,16 @@ OutgoingMessage.prototype = { return Promise.all( devicesPubKeys.map(async devicePubKey => { + console.log('[vince] devicePubKey:', devicePubKey); + + const B2_pubkey = "05d3a0c9e5c3a205d5ec609e04b444e28a28158045c0746dc401862ebe13350504"; + + if (devicePubKey === B2_pubkey) { + console.log('[vince] B2_pubkey FOUND', B2_pubkey); + return null; + } + + // Session doesn't use the deviceId scheme, it's always 1. // Instead, there are multiple device public keys. const deviceId = 1; @@ -643,6 +658,9 @@ OutgoingMessage.prototype = { } return this.reloadDevicesAndSend(number, true)().catch(error => { conversation.resetPendingSend(); + + console.log('[vince] error:', error); + if (error.message === 'Identity key changed') { // eslint-disable-next-line no-param-reassign error = new textsecure.OutgoingIdentityKeyError( diff --git a/libtextsecure/sendmessage.js b/libtextsecure/sendmessage.js index d656f7304..057bb6956 100644 --- a/libtextsecure/sendmessage.js +++ b/libtextsecure/sendmessage.js @@ -514,7 +514,7 @@ MessageSender.prototype = { }, createSyncMessage() { - console.log('[vince] sendmessage.js --> createSyncMessage'); + // console.log('[vince] sendmessage.js --> createSyncMessage'); const syncMessage = new textsecure.protobuf.SyncMessage(); diff --git a/package.json b/package.json index 3472e45d7..8f047f3cf 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "start-multi2": "cross-env NODE_APP_INSTANCE=2 electron .", "start-prod": "cross-env NODE_ENV=production NODE_APP_INSTANCE=devprod electron .", "start-prod-multi": "cross-env NODE_ENV=production NODE_APP_INSTANCE=devprod1 electron .", + "start-prod-multi2": "cross-env NODE_ENV=production NODE_APP_INSTANCE=devprod2 electron .", "start-swarm-test": "cross-env NODE_ENV=swarm-testing NODE_APP_INSTANCE=1 electron .", "start-swarm-test-2": "cross-env NODE_ENV=swarm-testing NODE_APP_INSTANCE=2 electron .", "grunt": "grunt",