mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 03:34:14 +00:00
Fixed start party by invites
This commit is contained in:
parent
769d9e5148
commit
439d20c82e
1 changed files with 5 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
habitrpg.controller('InviteToGroupCtrl', ['$scope', 'User', 'Groups', 'injectedGroup', '$http', 'Notification',
|
||||
function($scope, User, Groups, injectedGroup, $http, Notification) {
|
||||
habitrpg.controller('InviteToGroupCtrl', ['$scope', '$rootScope', 'User', 'Groups', 'injectedGroup', '$http', 'Notification',
|
||||
function($scope, $rootScope, User, Groups, injectedGroup, $http, Notification) {
|
||||
$scope.group = injectedGroup;
|
||||
|
||||
$scope.inviter = User.user.profile.name;
|
||||
|
|
@ -22,6 +22,8 @@ habitrpg.controller('InviteToGroupCtrl', ['$scope', 'User', 'Groups', 'injectedG
|
|||
return Groups.Group.create($scope.group)
|
||||
.then(function(response) {
|
||||
$scope.group = response.data.data;
|
||||
User.sync();
|
||||
Groups.data.party = $scope.group;
|
||||
_inviteByMethod(inviteMethod);
|
||||
});
|
||||
}
|
||||
|
|
@ -46,6 +48,7 @@ habitrpg.controller('InviteToGroupCtrl', ['$scope', 'User', 'Groups', 'injectedG
|
|||
.then(function() {
|
||||
Notification.text(window.env.t('invitationsSent'));
|
||||
_resetInvitees();
|
||||
$rootScope.hardRedirect('/#/options/groups/party');
|
||||
}, function(){
|
||||
_resetInvitees();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue