mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
committed by
Blade Barringer
parent
e3c40aa142
commit
679378331d
@@ -34,11 +34,6 @@ habitrpg.controller("GuildsCtrl", ['$scope', 'Groups', 'User', 'Challenges', '$r
|
||||
Groups.Group.create(group)
|
||||
.then(function (response) {
|
||||
var createdGroup = response.data.data;
|
||||
if (createdGroup.privacy == 'public') {
|
||||
Analytics.track({'hitType':'event', 'eventCategory':'behavior', 'eventAction':'join group', 'owner':true, 'groupType':'guild', 'privacy': createdGroup.privacy, 'groupName':createdGroup.name})
|
||||
} else {
|
||||
Analytics.track({'hitType':'event', 'eventCategory':'behavior', 'eventAction':'join group', 'owner':true, 'groupType':'guild', 'privacy': createdGroup.privacy})
|
||||
}
|
||||
$rootScope.hardRedirect('/#/options/groups/guilds/' + createdGroup._id);
|
||||
});
|
||||
}
|
||||
@@ -59,12 +54,6 @@ habitrpg.controller("GuildsCtrl", ['$scope', 'Groups', 'User', 'Challenges', '$r
|
||||
|
||||
User.user.guilds.push(joinedGroup._id);
|
||||
|
||||
if (joinedGroup.privacy == 'public') {
|
||||
Analytics.track({'hitType':'event', 'eventCategory':'behavior', 'eventAction':'join group', 'owner':false, 'groupType':'guild','privacy': joinedGroup.privacy, 'groupName': joinedGroup.name})
|
||||
} else {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user