Move attachment/websocket [en|de]cryption to libtextsecure

This commit is contained in:
Matt Corallo 2015-01-15 18:11:08 -10:00 committed by lilia
parent a9617068a2
commit 403ae4376d
7 changed files with 88 additions and 56 deletions

View file

@ -37,7 +37,7 @@
new WebSocketResource(socket, function(request) {
// TODO: handle different types of requests. for now we only expect
// PUT /messages <encrypted IncomingPushMessageSignal>
textsecure.protocol.decryptWebsocketMessage(request.body).then(function(plaintext) {
textsecure.crypto.decryptWebsocketMessage(request.body).then(function(plaintext) {
var proto = textsecure.protobuf.IncomingPushMessageSignal.decode(plaintext);
// After this point, decoding errors are not the server's
// fault, and we should handle them gracefully and tell the