From 3cbb90516fbc8f3d716e9988cd45e4de6c10110d Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 13 May 2020 05:43:13 +1000 Subject: [PATCH] Remove clgs --- js/conversation_controller.js | 5 --- js/models/conversations.js | 52 +++++++++++++++---------------- libtextsecure/message_receiver.js | 4 --- package.json | 2 -- 4 files changed, 25 insertions(+), 38 deletions(-) diff --git a/js/conversation_controller.js b/js/conversation_controller.js index 3ccee6521..7def4358f 100644 --- a/js/conversation_controller.js +++ b/js/conversation_controller.js @@ -168,8 +168,6 @@ const deviceIds = await textsecure.storage.protocol.getDeviceIds(id); - console.log('[vince] deviceIds:', deviceIds); - await Promise.all( deviceIds.map(deviceId => { const address = new libsignal.SignalProtocolAddress(id, deviceId); @@ -178,9 +176,6 @@ address ); - console.log('[vince] address:', address); - console.log('[vince] sessionCipher:', sessionCipher); - return sessionCipher.deleteAllSessionsForDevice(); }) ); diff --git a/js/models/conversations.js b/js/models/conversations.js index e74f3d5e6..ce02d604b 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -2235,8 +2235,6 @@ }); message.set({ id }); - console.log('[vince] conversations.js --> groupUpdate:', groupUpdate); - const options = this.getSendOptions(); message.send( this.wrapSend( @@ -2274,31 +2272,31 @@ const groupNumbers = this.getRecipients(); this.set({ left: true }); - // await window.Signal.Data.updateConversation(this.id, this.attributes, { - // Conversation: Whisper.Conversation, - // }); - - // const message = this.messageCollection.add({ - // group_update: { left: 'You' }, - // conversationId: this.id, - // type: 'outgoing', - // sent_at: now, - // received_at: now, - // }); - - // const id = await window.Signal.Data.saveMessage(message.attributes, { - // Message: Whisper.Message, - // }); - // message.set({ id }); - - // const options = this.getSendOptions(); - // message.send( - // this.wrapSend( - // textsecure.messaging.leaveGroup(this.id, groupNumbers, options) - // ) - // ); - - // this.updateTextInputState(); + await window.Signal.Data.updateConversation(this.id, this.attributes, { + Conversation: Whisper.Conversation, + }); + + const message = this.messageCollection.add({ + group_update: { left: 'You' }, + conversationId: this.id, + type: 'outgoing', + sent_at: now, + received_at: now, + }); + + const id = await window.Signal.Data.saveMessage(message.attributes, { + Message: Whisper.Message, + }); + message.set({ id }); + + const options = this.getSendOptions(); + message.send( + this.wrapSend( + textsecure.messaging.leaveGroup(this.id, groupNumbers, options) + ) + ); + + this.updateTextInputState(); } }, diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index d4ae29a6d..94b14fc7b 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -1427,10 +1427,6 @@ MessageReceiver.prototype.extend({ ); } - console.log('[vince] THIS IS A syncMessage:'); - console.log('[vince] envelope:', envelope); - console.log('[vince] syncMessage:', syncMessage); - if (syncMessage.sent) { const sentMessage = syncMessage.sent; const to = sentMessage.message.group diff --git a/package.json b/package.json index 7907acb8c..3472e45d7 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,6 @@ "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-prod-multi3": "cross-env NODE_ENV=production NODE_APP_INSTANCE=devprod3 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",