mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Populate registrationIds on deviceObjects
Saves us from doing so later. // FREEBIE
This commit is contained in:
@@ -73,13 +73,18 @@
|
||||
deviceIds.push(deviceId);
|
||||
}
|
||||
}
|
||||
return deviceIds.map(function(deviceId) {
|
||||
return Promise.all(deviceIds.map(function(deviceId) {
|
||||
var encodedNumber = number + '.' + deviceId;
|
||||
var deviceObject = tempKeys[encodedNumber] || {};
|
||||
deviceObject.encodedNumber = encodedNumber;
|
||||
deviceObject.identityKey = identityKey;
|
||||
return deviceObject;
|
||||
});
|
||||
return textsecure.protocol_wrapper.getRegistrationId(encodedNumber).then(function(registrationId) {
|
||||
if (deviceObject.registrationId === undefined) {
|
||||
deviceObject.registrationId = registrationId;
|
||||
}
|
||||
return deviceObject;
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user