Allow for zero-length attachment pointers

This commit is contained in:
Scott Nonnenberg 2019-07-24 09:14:59 -07:00
parent d42eb2126e
commit 2beb421067

View file

@ -1246,7 +1246,7 @@ MessageReceiver.prototype.extend({
window.Signal.Crypto.base64ToArrayBuffer(digest) window.Signal.Crypto.base64ToArrayBuffer(digest)
); );
if (!size) { if (!_.isNumber(size)) {
throw new Error( throw new Error(
`downloadAttachment: Size was not provided, actual size was ${ `downloadAttachment: Size was not provided, actual size was ${
data.byteLength data.byteLength