Responding to pull request review feedback

- messages.getQuoteObjectUrl: early return
- backup.js: explaining variables for long if statement
- types/messages.js: Log if thumbnail has neither data nor path
- sendmessage.js:
  - remove extraneous logging
  - fix indentation
  - upload attachments and thumbnails in parallel
- preload: don't load fs for tests, just fse
- _conversation.scss: split two selectors into two lines, 0px -> 0
- backup_test.js: use fse.existsSync and comment twoSlashes regex
- network_tests_view_test.js: Comment duplicate assignment to window.getSocketStatus
This commit is contained in:
Scott Nonnenberg 2018-04-23 15:36:47 -07:00
parent 6ec6bf08c8
commit c02860af5c
No known key found for this signature in database
GPG key ID: 5F82280C35134661
8 changed files with 34 additions and 18 deletions

View file

@ -97,11 +97,10 @@ Message.prototype = {
if (this.quote) {
var QuotedAttachment = textsecure.protobuf.DataMessage.Quote.QuotedAttachment;
var Quote = textsecure.protobuf.DataMessage.Quote;
console.log(this.quote);
proto.quote = new Quote();
proto.quote = new Quote();
var quote = proto.quote;
var quote = proto.quote;
quote.id = this.quote.id;
quote.author = this.quote.author;
quote.text = this.quote.text;
@ -289,9 +288,10 @@ MessageSender.prototype = {
sendMessage: function(attrs) {
var message = new Message(attrs);
return this.uploadAttachments(message).then(function() {
return this.uploadThumbnails(message);
}.bind(this)).then(function() {
return Promise.all([
this.uploadAttachments(message),
this.uploadThumbnails(message),
]).then(function() {
return new Promise(function(resolve, reject) {
this.sendMessageProto(
message.timestamp,