remove need to refresh after having accepted party invite

This commit is contained in:
Matteo Pagliazzi
2013-10-28 16:21:53 +01:00
parent cd97cc1e24
commit e8173a4962
2 changed files with 6 additions and 1 deletions

View File

@@ -173,7 +173,8 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Groups', '$http', 'A
$scope.join = function(party){
var group = new Groups.Group({_id: party.id, name: party.name});
// there a better way to access GroupsCtrl.groups.party?
Groups.groups.party = group.$join(function(){
group.$join(function(party){
$scope.group = party;
User.user.invitations.party = undefined;
});
}