Fix a missing function and dont blow up on delivery receipts

This commit is contained in:
Matt Corallo 2014-07-26 01:53:24 -04:00
parent d9f53d4c01
commit f6f35c5b61
4 changed files with 13 additions and 1 deletions

View file

@ -792,6 +792,8 @@ window.textsecure.crypto = function() {
throw new Error("Bad version byte");
var from = proto.source + "." + (proto.sourceDevice == null ? 0 : proto.sourceDevice);
return handlePreKeyWhisperMessage(from, getString(proto.message));
case textsecure.protos.IncomingPushMessageProtobuf.Type.RECEIPT:
return Promise.resolve(null);
default:
return new Promise(function(resolve, reject) { reject(new Error("Unknown message type")); });
}