fix(client): Allow users to reject invites to new parties

closes #7691
This commit is contained in:
Blade Barringer
2016-06-18 20:21:00 -05:00
parent 813aa2cf38
commit e28946bcfb
2 changed files with 4 additions and 3 deletions

View File

@@ -152,8 +152,9 @@ habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','
}
$scope.reject = function(party) {
Groups.Group.rejectInvite(party.id);
User.set({'invitations.party':{}});
Groups.Group.rejectInvite(party.id).then(function () {
User.sync();
});
}
$scope.questInit = function() {

View File

@@ -5,4 +5,4 @@
p {{::env.t('invitedToNewParty', { partyName: #{newParty}.name })}}
p
button.btn.btn-success(ng-click='leaveOldPartyAndJoinNewParty(#{newParty}.id, #{newParty}.name)')=env.t('joinNewParty')
button.btn.btn-default(ng-click='reject()')=env.t('declineInvitation')
button.btn.btn-default(ng-click='reject(#{newParty})')=env.t('declineInvitation')