pull/7207/head
Martin Schoeler 9 years ago
parent e5b1d8184d
commit d148aa8e00
  1. 2
      client/methods/deleteMessage.js
  2. 4
      packages/rocketchat-lib/client/MessageAction.js
  3. 2
      packages/rocketchat-lib/server/methods/deleteMessage.js

@ -21,7 +21,7 @@ Meteor.methods({
return false;
}
const blockDeleteInMinutes = RocketChat.settings.get('Message_AllowDeleting_BlockDeleteInMinutes');
if (!(forceDelete) || (_.isNumber(blockDeleteInMinutes) && blockDeleteInMinutes !== 0)) {
if (!forceDelete && (_.isNumber(blockDeleteInMinutes) && blockDeleteInMinutes !== 0)) {
if (message.ts) {
const msgTs = moment(message.ts);
if (msgTs) {

@ -188,7 +188,9 @@ Meteor.startup(function() {
return;
}
const blockDeleteInMinutes = RocketChat.settings.get('Message_AllowDeleting_BlockDeleteInMinutes');
if ((blockDeleteInMinutes != null && blockDeleteInMinutes !== 0) || !(forceDelete)) {
if (forceDelete) {
return true;
} else if ((blockDeleteInMinutes != null && blockDeleteInMinutes !== 0)) {
let msgTs;
if (message.ts != null) {
msgTs = moment(message.ts);

@ -35,7 +35,7 @@ Meteor.methods({
});
}
const blockDeleteInMinutes = RocketChat.settings.get('Message_AllowDeleting_BlockDeleteInMinutes');
if ((blockDeleteInMinutes != null && blockDeleteInMinutes !== 0) || !(forceDelete)) {
if ((blockDeleteInMinutes != null && blockDeleteInMinutes !== 0) && !(forceDelete)) {
if (originalMessage.ts == null) {
return;
}

Loading…
Cancel
Save