This commit is contained in:
Matteo Pagliazzi
2013-11-04 15:21:05 +01:00
parent 774ded9fb2
commit 63b4e5152e

View File

@@ -83,13 +83,14 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Groups', '$http', 'A
$scope._sending = false;
$scope.postChat = function(group, message){
console.log($scope._sending)
if (_.isEmpty(message) || $scope._sending) return;
$scope._sending = true;
group.$postChat({message:message}, function(data){
group.chat = data.chat;
$scope._chatMessage = '';
$scope._sending = false;
}, function(err){
$scope._sending = false;
});
}