mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-12 23:08:35 +00:00
Fix bug where non-party members could not send invitations
This commit is contained in:
parent
807e6eb7cf
commit
f65ca3cf48
1 changed files with 7 additions and 6 deletions
|
|
@ -15,14 +15,15 @@ habitrpg.controller('InviteToGroupCtrl', ['$scope', 'User', 'Groups', 'injectedG
|
|||
};
|
||||
|
||||
$scope.inviteNewUsers = function(inviteMethod) {
|
||||
if (!$scope.group.name) {
|
||||
$scope.group.name = env.t('possessiveParty', {name: User.user.profile.name});
|
||||
if (!$scope.group._id) {
|
||||
$scope.group.name = $scope.group.name || env.t('possessiveParty', {name: User.user.profile.name});
|
||||
return $scope.group.$save()
|
||||
.then(function(res) {
|
||||
_inviteByMethod(inviteMethod);
|
||||
});
|
||||
}
|
||||
|
||||
$scope.group.$save()
|
||||
.then(function(res) {
|
||||
_inviteByMethod(inviteMethod);
|
||||
});
|
||||
_inviteByMethod(inviteMethod);
|
||||
};
|
||||
|
||||
function _inviteByMethod(inviteMethod) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue