fix: Go to loaded party page when inviting friends to party

This commit is contained in:
Blade Barringer
2016-06-07 12:36:07 -05:00
parent 48957369f3
commit 5beb6106c9
2 changed files with 12 additions and 5 deletions

View File

@@ -48,14 +48,13 @@ habitrpg.controller('InviteToGroupCtrl', ['$scope', '$rootScope', 'User', 'Group
.then(function() {
Notification.text(window.env.t('invitationsSent'));
_resetInvitees();
var redirectTo = '/#/options/groups/'
if ($scope.group.type === 'party') {
redirectTo += 'party';
} else {
redirectTo += ('guilds/' + $scope.group._id);
Groups.removePartyCache();
$rootScope.$state.go('options.social.party');
return;
}
$rootScope.hardRedirect(redirectTo);
$rootScope.hardRedirect('/#/options/groups/guilds/' + $scope.group._id);
}, function(){
_resetInvitees();
});