mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Add feature to join new party if user is in a party of one
This commit is contained in:
@@ -88,8 +88,15 @@ habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','
|
||||
}
|
||||
};
|
||||
|
||||
$scope.leaveOldPartyAndJoinNewParty = function(newPartyId, newPartyName) {
|
||||
if (confirm('Are you sure you want to delete your party and join ' + newPartyName + '?')) {
|
||||
Groups.Group.leave({gid: Groups.party()._id, keep:false}, undefined, function() {
|
||||
$scope.join({ id: newPartyId, name: newPartyName });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.reject = function(){
|
||||
//User.user.invitations.party = undefined;
|
||||
User.set({'invitations.party':{}});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user