mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Fix bug where non-party members could not send invitations
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user