|
|
|
@ -208,10 +208,14 @@ Meteor.startup(async function() { |
|
|
|
|
.data('reply', messages) |
|
|
|
|
.trigger('dataChange'); |
|
|
|
|
}, |
|
|
|
|
condition({ subscription }) { |
|
|
|
|
condition({ subscription, room }) { |
|
|
|
|
if (subscription == null) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
const isLivechatRoom = roomTypes.isLivechatRoom(room.t); |
|
|
|
|
if (isLivechatRoom) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
}, |
|
|
|
@ -303,10 +307,14 @@ Meteor.startup(async function() { |
|
|
|
|
const { msg } = messageArgs(this); |
|
|
|
|
getChatMessagesFrom(msg).confirmDeleteMsg(msg); |
|
|
|
|
}, |
|
|
|
|
condition({ msg: message, subscription }) { |
|
|
|
|
condition({ msg: message, subscription, room }) { |
|
|
|
|
if (!subscription) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
const isLivechatRoom = roomTypes.isLivechatRoom(room.t); |
|
|
|
|
if (isLivechatRoom) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return canDeleteMessage({ |
|
|
|
|
rid: message.rid, |
|
|
|
@ -358,7 +366,11 @@ Meteor.startup(async function() { |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
condition({ subscription }) { |
|
|
|
|
condition({ subscription, room }) { |
|
|
|
|
const isLivechatRoom = roomTypes.isLivechatRoom(room.t); |
|
|
|
|
if (isLivechatRoom) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return Boolean(subscription); |
|
|
|
|
}, |
|
|
|
|
order: 17, |
|
|
|
|