diff options
Diffstat (limited to 'src/components/NewMessageForm')
-rw-r--r-- | src/components/NewMessageForm/NewMessageForm.vue | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/NewMessageForm/NewMessageForm.vue b/src/components/NewMessageForm/NewMessageForm.vue index 0cf2b45ec..84b25e943 100644 --- a/src/components/NewMessageForm/NewMessageForm.vue +++ b/src/components/NewMessageForm/NewMessageForm.vue @@ -405,12 +405,14 @@ export default { * * @param {File[] | FileList} files pasted files list * @param {bool} rename whether to rename the files + * @param {bool} isVoiceMessage indicates whether the file is a vooicemessage + */ - async handleFiles(files, rename = false) { - // Create a unique id for the upload operation + async handleFiles(files, rename = false, isVoiceMessage) { + // Create a unique id for the upload operation const uploadId = new Date().getTime() // Uploads and shares the files - await this.$store.dispatch('initialiseUpload', { files, token: this.token, uploadId, rename }) + await this.$store.dispatch('initialiseUpload', { files, token: this.token, uploadId, rename, isVoiceMessage }) }, /** @@ -462,7 +464,7 @@ export default { }, handleAudioFile(payload) { - this.handleFiles([payload]) + this.handleFiles([payload], false, true) }, handleRecording(payload) { |