Skip to content

Commit

Permalink
fix(client): Allow users to reject invites to new parties
Browse files Browse the repository at this point in the history
closes #7691
  • Loading branch information
crookedneighbor committed Jun 19, 2016
1 parent 813aa2c commit e28946b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions website/client/js/controllers/partyCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')

0 comments on commit e28946b

Please sign in to comment.