This commit is contained in:
Diego Mello 2017-11-22 17:32:49 -02:00
parent 9b9271e833
commit aed760955c
1 changed files with 2 additions and 2 deletions

View File

@ -164,9 +164,9 @@ export default class Message extends React.Component {
isOwn = () => this.props.item.u && this.props.item.u._id === this.props.user.id;
allowEdit = () => {
const isEditAllowed = this.props.Message_AllowEditing;
const editOwn = this.isOwn();
if (!(this.props.hasEditPermission || (isEditAllowed && editOwn))) {
const { Message_AllowEditing: isEditAllowed, hasEditPermission } = this.props;
if (!(hasEditPermission || (isEditAllowed && editOwn))) {
return false;
}
const blockEditInMinutes = this.props.Message_AllowEditing_BlockEditInMinutes;