diff --git a/apps/meteor/app/custom-sounds/server/methods/uploadCustomSound.js b/apps/meteor/app/custom-sounds/server/methods/uploadCustomSound.js index 63390334870..e87449c79c1 100644 --- a/apps/meteor/app/custom-sounds/server/methods/uploadCustomSound.js +++ b/apps/meteor/app/custom-sounds/server/methods/uploadCustomSound.js @@ -16,10 +16,7 @@ Meteor.methods({ const rs = RocketChatFile.bufferToStream(file); RocketChatFileCustomSoundsInstance.deleteFile(`${soundData._id}.${soundData.extension}`); const ws = RocketChatFileCustomSoundsInstance.createWriteStream(`${soundData._id}.${soundData.extension}`, contentType); - ws.on( - 'end', - setTimeout(() => api.broadcast('notify.updateCustomSound', { soundData }), 500), - ); + ws.on('end', () => setTimeout(() => api.broadcast('notify.updateCustomSound', { soundData }), 500)); rs.pipe(ws); },