Prevent modal from popping up if already reported
This commit is contained in:
committed by
Matteo Pagliazzi
parent
2f506ce0e0
commit
7a7c13ff6d
@@ -109,12 +109,14 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
if(!message.flags) message.flags = {};
|
||||
if(message.flags[User.user._id])
|
||||
Notification.text(window.env.t('abuseAlreadyReported'));
|
||||
$scope.abuseObject = message;
|
||||
Members.selectMember(message.uuid, function(){
|
||||
$rootScope.openModal('abuse-flag',{controller:'MemberModalCtrl',
|
||||
scope: $scope
|
||||
else {
|
||||
$scope.abuseObject = message;
|
||||
Members.selectMember(message.uuid, function(){
|
||||
$rootScope.openModal('abuse-flag',{controller:'MemberModalCtrl',
|
||||
scope: $scope
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user