pull/1109/head
Vincent 5 years ago
parent 3c571770ed
commit b5f0f552a7

@ -649,7 +649,7 @@
); );
}, },
async updateVerified() { async updateVerified() {
console.log('[vince] conversations.js --> updateVerified()'); // console.log('[vince] conversations.js --> updateVerified()');
if (this.isPrivate()) { if (this.isPrivate()) {
await this.initialPromise; await this.initialPromise;
@ -856,7 +856,7 @@
return this.get('friendRequestStatus'); return this.get('friendRequestStatus');
}, },
async getPrimaryConversation() { async getPrimaryConversation() {
console.log('[vince] conversation.js --> getPrimaryConversation'); // console.log('[vince] conversation.js --> getPrimaryConversation');
if (!this.isSecondaryDevice()) { if (!this.isSecondaryDevice()) {
// This is already the primary conversation // This is already the primary conversation
@ -875,7 +875,7 @@
return this; return this;
}, },
async updateTextInputState() { async updateTextInputState() {
console.log('[vince] conversation.js --> updateTextInputState'); // console.log('[vince] conversation.js --> updateTextInputState');
if (this.isRss()) { if (this.isRss()) {
// or if we're an rss conversation, disable it // or if we're an rss conversation, disable it
@ -926,7 +926,7 @@
return this.get('primaryDevicePubKey') || this.id; return this.get('primaryDevicePubKey') || this.id;
}, },
async setSecondaryStatus(newStatus, primaryDevicePubKey) { async setSecondaryStatus(newStatus, primaryDevicePubKey) {
console.log('[vince] conversation.js --> setSecondaryStatus'); // console.log('[vince] conversation.js --> setSecondaryStatus');
if (this.get('secondaryStatus') !== newStatus) { if (this.get('secondaryStatus') !== newStatus) {
this.set({ this.set({
@ -939,7 +939,7 @@
} }
}, },
async setFriendRequestStatus(newStatus, options = {}) { async setFriendRequestStatus(newStatus, options = {}) {
console.log('[vince] conversation.js --> setFriendRequestStatus'); // console.log('[vince] conversation.js --> setFriendRequestStatus');
const { blockSync } = options; const { blockSync } = options;
// Ensure that the new status is a valid FriendStatusEnum value // Ensure that the new status is a valid FriendStatusEnum value

@ -235,7 +235,7 @@ function initializeMigrations({
logger, logger,
}), }),
upgradeMessageSchema: (message, options = {}) => { upgradeMessageSchema: (message, options = {}) => {
console.log('[vince] signal.js --> upgradeMessageSchema'); // console.log('[vince] signal.js --> upgradeMessageSchema');
const { maxVersion } = options; const { maxVersion } = options;

@ -1629,7 +1629,7 @@
}, },
showSendConfirmationDialog(e, contacts) { showSendConfirmationDialog(e, contacts) {
console.log('[vince] conversation_view.js --> showSendConfirmationDialog'); // console.log('[vince] conversation_view.js --> showSendConfirmationDialog');
let message; let message;
const isUnverified = this.model.isUnverified(); const isUnverified = this.model.isUnverified();
@ -2481,7 +2481,7 @@
!event.ctrlKey !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 // enter pressed - submit the form now
event.preventDefault(); event.preventDefault();

@ -122,8 +122,13 @@ OutgoingMessage.prototype = {
libloki.storage libloki.storage
.getAllDevicePubKeysForPrimaryPubKey(number) .getAllDevicePubKeysForPrimaryPubKey(number)
// Don't send to ourselves // Don't send to ourselves
.then(devicesPubKeys => .then(devicesPubKeys => {
devicesPubKeys.filter(pubKey => pubKey !== ourNumber) console.log('[vince] devicesPubKeys should display for B1 and B2', devicesPubKeys);
console.log('[vince] devicesPubKeys:', devicesPubKeys);
return devicesPubKeys.filter(pubKey => pubKey !== ourNumber)
}
) )
.then(devicesPubKeys => { .then(devicesPubKeys => {
if (devicesPubKeys.length === 0) { if (devicesPubKeys.length === 0) {
@ -315,6 +320,16 @@ OutgoingMessage.prototype = {
return Promise.all( return Promise.all(
devicesPubKeys.map(async devicePubKey => { 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. // Session doesn't use the deviceId scheme, it's always 1.
// Instead, there are multiple device public keys. // Instead, there are multiple device public keys.
const deviceId = 1; const deviceId = 1;
@ -643,6 +658,9 @@ OutgoingMessage.prototype = {
} }
return this.reloadDevicesAndSend(number, true)().catch(error => { return this.reloadDevicesAndSend(number, true)().catch(error => {
conversation.resetPendingSend(); conversation.resetPendingSend();
console.log('[vince] error:', error);
if (error.message === 'Identity key changed') { if (error.message === 'Identity key changed') {
// eslint-disable-next-line no-param-reassign // eslint-disable-next-line no-param-reassign
error = new textsecure.OutgoingIdentityKeyError( error = new textsecure.OutgoingIdentityKeyError(

@ -514,7 +514,7 @@ MessageSender.prototype = {
}, },
createSyncMessage() { createSyncMessage() {
console.log('[vince] sendmessage.js --> createSyncMessage'); // console.log('[vince] sendmessage.js --> createSyncMessage');
const syncMessage = new textsecure.protobuf.SyncMessage(); const syncMessage = new textsecure.protobuf.SyncMessage();

@ -20,6 +20,7 @@
"start-multi2": "cross-env NODE_APP_INSTANCE=2 electron .", "start-multi2": "cross-env NODE_APP_INSTANCE=2 electron .",
"start-prod": "cross-env NODE_ENV=production NODE_APP_INSTANCE=devprod 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-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": "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 .", "start-swarm-test-2": "cross-env NODE_ENV=swarm-testing NODE_APP_INSTANCE=2 electron .",
"grunt": "grunt", "grunt": "grunt",

Loading…
Cancel
Save