diff --git a/apps/meteor/server/lib/roles/createOrUpdateProtectedRole.ts b/apps/meteor/server/lib/roles/createOrUpdateProtectedRole.ts index cdc43cdad93a..ea59a2961ea4 100644 --- a/apps/meteor/server/lib/roles/createOrUpdateProtectedRole.ts +++ b/apps/meteor/server/lib/roles/createOrUpdateProtectedRole.ts @@ -1,8 +1,6 @@ import type { IRole, AtLeast } from '@rocket.chat/core-typings'; import { Roles } from '@rocket.chat/models'; -import { notifyOnRoleChanged, notifyOnRoleChangedById } from '../../../app/lib/server/lib/notifyListener'; - export const createOrUpdateProtectedRoleAsync = async ( roleId: string, roleData: AtLeast, 'name'>, @@ -12,7 +10,7 @@ export const createOrUpdateProtectedRoleAsync = async ( }); if (role) { - const updatedRole = await Roles.updateById( + await Roles.updateById( roleId, roleData.name || role.name, roleData.scope || role.scope, @@ -20,8 +18,6 @@ export const createOrUpdateProtectedRoleAsync = async ( roleData.mandatory2fa || role.mandatory2fa, ); - void notifyOnRoleChanged(updatedRole); - return; } @@ -33,6 +29,4 @@ export const createOrUpdateProtectedRoleAsync = async ( ...roleData, protected: true, }); - - void notifyOnRoleChangedById(roleId); };