Process attachment before it’s sent
Picked this place since it already had various async steps, similar to `onMessageReceived` for the incoming `Attachment.process`. Could we try have this live closer to where we store it in IndexedDB, e.g. `Conversation::sendMessage`?
This commit is contained in:
parent
a4582ae2fb
commit
532ac3e273
|
@ -9,6 +9,8 @@
|
|||
'use strict';
|
||||
window.Whisper = window.Whisper || {};
|
||||
|
||||
const {Attachment} = window.Whisper;
|
||||
|
||||
Whisper.FileSizeToast = Whisper.ToastView.extend({
|
||||
templateName: 'file-size-modal',
|
||||
render_attributes: function() {
|
||||
|
@ -215,6 +217,7 @@
|
|||
return this.autoScale(file)
|
||||
.then(this.readFile)
|
||||
.then(setFlags(attachmentFlags))
|
||||
.then(Attachment.process);
|
||||
},
|
||||
/* jshint ignore:end */
|
||||
/* eslint-disable */
|
||||
|
|
Loading…
Reference in New Issue