DEV: Remove unused `User` methods (#22347)

This commit is contained in:
Jarek Radosz 2023-06-29 12:23:59 +02:00 committed by GitHub
parent 6b4762e450
commit a7421d3675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 22 deletions

View File

@ -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);