Skip to content

Commit

Permalink
DEV: Remove unused User methods (discourse#22347)
Browse files Browse the repository at this point in the history
  • Loading branch information
CvX authored Jun 29, 2023
1 parent 6b4762e commit a7421d3
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions app/assets/javascripts/discourse/app/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,6 @@ const User = RestModel.extend({
});
},

copy() {
return User.create(this.getProperties(Object.keys(this)));
},

save(fields) {
const data = this.getProperties(
userFields.filter((uf) => !fields || fields.includes(uf))
Expand Down Expand Up @@ -682,11 +678,6 @@ const User = RestModel.extend({
return groups.length === 0 ? null : groups;
},

@discourseComputed("filteredGroups", "numGroupsToDisplay")
showMoreGroupsLink(filteredGroups, numGroupsToDisplay) {
return filteredGroups.length > numGroupsToDisplay;
},

// NOTE: This only includes groups *visible* to the user via the serializer,
// so be wary when using this.
isInAnyGroups(groupIds) {
Expand Down Expand Up @@ -840,17 +831,6 @@ const User = RestModel.extend({
});
},

generateMultipleUseInviteLink(
group_ids,
max_redemptions_allowed,
expires_at
) {
return ajax("/invites", {
type: "POST",
data: { group_ids, max_redemptions_allowed, expires_at },
});
},

@dependentKeyCompat
get mutedCategories() {
return Category.findByIds(this.get("muted_category_ids"));
Expand Down Expand Up @@ -1380,9 +1360,7 @@ User.reopenClass(Singleton, {
data: { timezone: user.user_option.timezone },
});
},
});

User.reopenClass({
create(args) {
args = args || {};
this.deleteStatusTrackingFields(args);
Expand Down

0 comments on commit a7421d3

Please sign in to comment.