Merge branch 'CancelSendOnBlankPM' of https://github.com/rdhammond/habitrpg into rdhammond-CancelSendOnBlankPM

Conflicts:
	website/views/shared/modals/members.jade
This commit is contained in:
Alys
2015-04-05 23:24:46 +10:00
5 changed files with 30 additions and 294 deletions

View File

@@ -159,6 +159,9 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
$scope.profile = member;
});
$scope.sendPrivateMessage = function(uuid, message){
// Don't do anything if the user somehow gets here without a message.
if (!message) return;
$http.post('/api/v2/members/'+uuid+'/message',{message:message}).success(function(){
Notification.text(window.env.t('messageSentAlert'));
$rootScope.User.sync();