diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index d5cd14ae52..4d67a08e14 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -458,7 +458,10 @@ export default class extends Endpoint { // eslint- const newName = updates.name === undefined ? user.name : updates.name; if (newName != null) { - const hasProhibitedWords = this.checkScreennameProhibitedWordsContain(newName, this.instanceMeta.prohibitedPartialScreenNames); + let hasProhibitedWords = false; + if (!await this.roleService.isModerator(user)) { + hasProhibitedWords = this.checkScreennameProhibitedWordsContain(newName, this.instanceMeta.prohibitedPartialScreenNames); + } if (hasProhibitedWords) { throw new ApiError(meta.errors.screenNameContainsProhibitedWords); }