Full pipeline to send quotes, including thumbnail upload

This commit is contained in:
Scott Nonnenberg 2018-04-19 11:19:23 -07:00
parent 13ce056830
commit 73edabfb17
No known key found for this signature in database
GPG key ID: 5F82280C35134661
3 changed files with 63 additions and 7 deletions

View file

@ -663,7 +663,7 @@
};
},
sendMessage(body, attachments) {
sendMessage(body, attachments, quote) {
this.queueJob(async () => {
const now = Date.now();
@ -678,6 +678,7 @@
type: 'outgoing',
body,
conversationId: this.id,
quote,
attachments,
sent_at: now,
received_at: now,
@ -719,6 +720,7 @@
this.get('id'),
body,
attachmentsWithData,
quote,
now,
this.get('expireTimer'),
profileKey

View file

@ -1157,13 +1157,13 @@
}
const attachments = await this.fileInput.getFiles();
const sendDelta = Date.now() - this.sendStart;
console.log('Send pre-checks took', sendDelta, 'milliseconds');
this.model.sendMessage(message, attachments);
this.model.sendMessage(message, attachments, this.quote);
input.val('');
this.setQuoteMessage(null);
this.focusMessageFieldAndClearDisabled();
this.forceUpdateMessageFieldSize(e);
this.fileInput.deleteFiles();