From 0fac2e1d681dd23849a4b41a2a0fd80de826c24a Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 20 Feb 2017 19:02:51 -0800 Subject: [PATCH] Log when we see a 0 registrationId Most likely an indicator that the device we're dealing with is a 3rd party client. // FREEBIE --- js/libtextsecure.js | 3 +++ libtextsecure/outgoing_message.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 3ad06262..9655883d 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38741,6 +38741,9 @@ OutgoingMessage.prototype = { if (updateDevices === undefined || updateDevices.indexOf(device.deviceId) > -1) { var address = new libsignal.SignalProtocolAddress(number, device.deviceId); var builder = new libsignal.SessionBuilder(textsecure.storage.protocol, address); + if (device.registrationId === 0) { + console.log("device registrationId 0!"); + } return builder.processPreKey(device).catch(function(error) { if (error.message === "Identity key changed") { error = new textsecure.OutgoingIdentityKeyError( diff --git a/libtextsecure/outgoing_message.js b/libtextsecure/outgoing_message.js index 64cbb099..1177b2db 100644 --- a/libtextsecure/outgoing_message.js +++ b/libtextsecure/outgoing_message.js @@ -50,6 +50,9 @@ OutgoingMessage.prototype = { if (updateDevices === undefined || updateDevices.indexOf(device.deviceId) > -1) { var address = new libsignal.SignalProtocolAddress(number, device.deviceId); var builder = new libsignal.SessionBuilder(textsecure.storage.protocol, address); + if (device.registrationId === 0) { + console.log("device registrationId 0!"); + } return builder.processPreKey(device).catch(function(error) { if (error.message === "Identity key changed") { error = new textsecure.OutgoingIdentityKeyError(