From a4dba82d14959f98c4da04500d55f45f144f96e2 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Sun, 19 Jun 2016 09:41:43 -0500 Subject: [PATCH] fix(client): Refresh party page when inviting users --- website/client/js/controllers/inviteToGroupCtrl.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/website/client/js/controllers/inviteToGroupCtrl.js b/website/client/js/controllers/inviteToGroupCtrl.js index a4b8495a27..e5df814512 100644 --- a/website/client/js/controllers/inviteToGroupCtrl.js +++ b/website/client/js/controllers/inviteToGroupCtrl.js @@ -22,8 +22,6 @@ habitrpg.controller('InviteToGroupCtrl', ['$scope', '$rootScope', 'User', 'Group return Groups.Group.create($scope.group) .then(function(response) { $scope.group = response.data.data; - User.sync(); - Groups.data.party = $scope.group; _inviteByMethod(inviteMethod); }); } @@ -48,13 +46,12 @@ habitrpg.controller('InviteToGroupCtrl', ['$scope', '$rootScope', 'User', 'Group .then(function() { Notification.text(window.env.t('invitationsSent')); _resetInvitees(); - if ($scope.group.type === 'party') { - Groups.removePartyCache(); - $rootScope.$state.go('options.social.party'); - return; - } - $rootScope.hardRedirect('/#/options/groups/guilds/' + $scope.group._id); + if ($scope.group.type === 'party') { + $rootScope.hardRedirect('/#/options/groups/party'); + } else { + $rootScope.hardRedirect('/#/options/groups/guilds/' + $scope.group._id); + } }, function(){ _resetInvitees(); });