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:
parent
da9b6c5245
commit
0fac2e1d68
2 changed files with 6 additions and 0 deletions
|
@ -38741,6 +38741,9 @@ OutgoingMessage.prototype = {
|
||||||
if (updateDevices === undefined || updateDevices.indexOf(device.deviceId) > -1) {
|
if (updateDevices === undefined || updateDevices.indexOf(device.deviceId) > -1) {
|
||||||
var address = new libsignal.SignalProtocolAddress(number, device.deviceId);
|
var address = new libsignal.SignalProtocolAddress(number, device.deviceId);
|
||||||
var builder = new libsignal.SessionBuilder(textsecure.storage.protocol, address);
|
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) {
|
return builder.processPreKey(device).catch(function(error) {
|
||||||
if (error.message === "Identity key changed") {
|
if (error.message === "Identity key changed") {
|
||||||
error = new textsecure.OutgoingIdentityKeyError(
|
error = new textsecure.OutgoingIdentityKeyError(
|
||||||
|
|
|
@ -50,6 +50,9 @@ OutgoingMessage.prototype = {
|
||||||
if (updateDevices === undefined || updateDevices.indexOf(device.deviceId) > -1) {
|
if (updateDevices === undefined || updateDevices.indexOf(device.deviceId) > -1) {
|
||||||
var address = new libsignal.SignalProtocolAddress(number, device.deviceId);
|
var address = new libsignal.SignalProtocolAddress(number, device.deviceId);
|
||||||
var builder = new libsignal.SessionBuilder(textsecure.storage.protocol, address);
|
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) {
|
return builder.processPreKey(device).catch(function(error) {
|
||||||
if (error.message === "Identity key changed") {
|
if (error.message === "Identity key changed") {
|
||||||
error = new textsecure.OutgoingIdentityKeyError(
|
error = new textsecure.OutgoingIdentityKeyError(
|
||||||
|
|
Loading…
Reference in a new issue