mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
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:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user