Skip to content

Commit

Permalink
[FIX] Uploading Custom Sound files not working, but showing success (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris authored and MartinSchoeler committed Nov 28, 2022
1 parent 37da7ae commit 94293a4
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down

0 comments on commit 94293a4

Please sign in to comment.