From 4a3e0eb884c66f9abac33e6c547cbac3f5117e41 Mon Sep 17 00:00:00 2001 From: Husman Date: Sun, 12 Jun 2016 15:59:59 -0700 Subject: [PATCH] Removing accepted guild invitations from the local copy of the user object so the notification goes away without having to refresh. #7600 --- website/client/js/controllers/guildsCtrl.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/client/js/controllers/guildsCtrl.js b/website/client/js/controllers/guildsCtrl.js index 821b9aebba..34a1ab23a1 100644 --- a/website/client/js/controllers/guildsCtrl.js +++ b/website/client/js/controllers/guildsCtrl.js @@ -65,6 +65,8 @@ habitrpg.controller("GuildsCtrl", ['$scope', 'Groups', 'User', 'Challenges', '$r Analytics.track({'hitType':'event', 'eventCategory':'behavior', 'eventAction':'join group', 'owner':false, 'groupType':'guild','privacy': joinedGroup.privacy}) } + _.pull(User.user.invitations.guilds, group); + $location.path('/options/groups/guilds/' + joinedGroup._id); }); }