ソースを参照

Log when we see a 0 registrationId

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

// FREEBIE
lilia 7 年 前
コミット
0fac2e1d68
2 ファイル変更6 行追加0 行削除
  1. 3 0
      js/libtextsecure.js
  2. 3 0
      libtextsecure/outgoing_message.js

+ 3 - 0
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(

+ 3 - 0
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(