Pass protobuf attachment ids as strings
Latest protobuf.js requires that we pass in the sign value when making longs from strings, ex: dcodeIO.Long.fromString(id, true); However, it does the string->long conversion automatically if its given a string for a fixed64 field, so we can pass our string ids right in! ftw
This commit is contained in:
parent
73f4f64351
commit
800e5ab703
1 changed files with 1 additions and 1 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 = dcodeIO.Long.fromString(id);
|
||||
proto.id = id;
|
||||
proto.contentType = attachment.contentType;
|
||||
return proto;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue