Fix attachment ids
Parse attachment ids out of the attachment pointer url and return them as strings because the copy parsed by JSON suffers a loss of precision. Convert them to and from the format expected by the protobuf using facilities from decodeIO.Long.
This commit is contained in:
@@ -593,7 +593,7 @@ window.textsecure.subscribeToPush = function(message_callback) {
|
||||
throw new Error("Unknown flags in message");
|
||||
|
||||
var handleAttachment = function(attachment) {
|
||||
return textsecure.api.getAttachment(attachment.id).then(function(encryptedBin) {
|
||||
return textsecure.api.getAttachment(attachment.id.toString()).then(function(encryptedBin) {
|
||||
return textsecure.crypto.decryptAttachment(encryptedBin, toArrayBuffer(attachment.key)).then(function(decryptedBin) {
|
||||
attachment.decrypted = decryptedBin;
|
||||
});
|
||||
|
Reference in New Issue
Block a user