Log when we see a 0 registrationId

Most likely an indicator that the device we're dealing with is a 3rd
party client.

// FREEBIE
This commit is contained in:
lilia 2017-02-20 19:02:51 -08:00
parent da9b6c5245
commit 0fac2e1d68
2 changed files with 6 additions and 0 deletions

View file

@ -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(

View file

@ -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(