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:
parent
eebb14599f
commit
211129475c
3 changed files with 26 additions and 21 deletions
|
@ -200,7 +200,7 @@ window.textsecure.messaging = function() {
|
|||
var iv = textsecure.crypto.getRandomBytes(16);
|
||||
return textsecure.crypto.encryptAttachment(attachment.data, proto.key, iv).then(function(encryptedBin) {
|
||||
return textsecure.api.putAttachment(encryptedBin).then(function(id) {
|
||||
proto.id = id;
|
||||
proto.id = dcodeIO.Long.fromString(id);
|
||||
proto.contentType = attachment.contentType;
|
||||
return proto;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue