allow flagging the post of a deleted user (#7897)

* Allowing the flagging of messages that were written by user accounts that have since been deleted

* replacing ternary operator with else if, else paradigm

* formatting fixes

* fixing message in tests
This commit is contained in:
Travis
2016-08-15 20:14:52 -07:00
committed by Blade Barringer
parent 12f1aae2dd
commit 1a409848a8
4 changed files with 34 additions and 23 deletions

View File

@@ -96,20 +96,10 @@ habitrpg.controller('ChatCtrl', ['$scope', 'Groups', 'Chat', 'User', '$http', 'A
$scope.groupId = groupId;
$scope.isSystemMessage = message.uuid === 'system';
if (message.uuid === 'system') {
$rootScope.openModal('abuse-flag',{
controller:'MemberModalCtrl',
scope: $scope
});
} else {
Members.selectMember(message.uuid)
.then(function () {
$rootScope.openModal('abuse-flag',{
controller:'MemberModalCtrl',
scope: $scope
});
});
}
$rootScope.openModal('abuse-flag',{
controller:'MemberModalCtrl',
scope: $scope
});
}
};