From a7421d367532c250fad090a65bdbeef3d20432d3 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Thu, 29 Jun 2023 12:23:59 +0200 Subject: [PATCH] DEV: Remove unused `User` methods (#22347) --- .../javascripts/discourse/app/models/user.js | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/app/assets/javascripts/discourse/app/models/user.js b/app/assets/javascripts/discourse/app/models/user.js index b861f48564f..3bf74e96858 100644 --- a/app/assets/javascripts/discourse/app/models/user.js +++ b/app/assets/javascripts/discourse/app/models/user.js @@ -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)) @@ -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) { @@ -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")); @@ -1380,9 +1360,7 @@ User.reopenClass(Singleton, { data: { timezone: user.user_option.timezone }, }); }, -}); -User.reopenClass({ create(args) { args = args || {}; this.deleteStatusTrackingFields(args);