Skip to content

Commit

Permalink
Always call afterDeleteMessage calback
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego authored Apr 27, 2018
1 parent a7b4897 commit 035e883
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/rocketchat-lib/server/functions/deleteMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ RocketChat.deleteMessage = function(message, user) {
if (message.file && message.file._id) {
FileUpload.getStore('Uploads').deleteById(message.file._id);
}

Meteor.defer(function() {
RocketChat.callbacks.run('afterDeleteMessage', deletedMsg || { _id: message._id });
});
}

Meteor.defer(function() {
RocketChat.callbacks.run('afterDeleteMessage', deletedMsg || { _id: message._id });
});

// update last message
if (RocketChat.settings.get('Store_Last_Message')) {
const room = RocketChat.models.Rooms.findOneById(message.rid, { fields: { lastMessage: 1 } });
Expand Down

0 comments on commit 035e883

Please sign in to comment.