mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 18:38:15 +01:00
Remove getRegistrationId and encryptMessageFor from protocol_wrapper
We can now use protocol classes like SessionCipher directly because it supports per-device read/write serialization internally. // FREEBIE
This commit is contained in:
@@ -40,13 +40,6 @@
|
||||
return protocolInstance.closeOpenSessionForDevice(encodedNumber);
|
||||
});
|
||||
},
|
||||
encryptMessageFor: function(deviceObject, pushMessageContent) {
|
||||
return queueJobForNumber(deviceObject.encodedNumber, function() {
|
||||
var address = libsignal.SignalProtocolAddress.fromString(deviceObject.encodedNumber);
|
||||
var sessionCipher = new libsignal.SessionCipher(textsecure.storage.protocol, address);
|
||||
return sessionCipher.encrypt(pushMessageContent);
|
||||
});
|
||||
},
|
||||
startWorker: function() {
|
||||
protocolInstance.startWorker('/js/libsignal-protocol-worker.js');
|
||||
},
|
||||
@@ -61,11 +54,6 @@
|
||||
return protocolInstance.hasOpenSession(encodedNumber);
|
||||
});
|
||||
},
|
||||
getRegistrationId: function(encodedNumber) {
|
||||
return queueJobForNumber(encodedNumber, function() {
|
||||
return protocolInstance.getRegistrationId(encodedNumber);
|
||||
});
|
||||
},
|
||||
handlePreKeyWhisperMessage: function(from, blob) {
|
||||
console.log('prekey whisper message');
|
||||
blob.mark();
|
||||
|
||||
Reference in New Issue
Block a user