The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/authorization/client/usersNameChanged.js

18 lines
356 B

import { Meteor } from 'meteor/meteor';
import { Notifications } from '../../notifications';
import { RoomRoles } from '../../models';
Meteor.startup(function() {
Notifications.onLogged('Users:NameChanged', function({ _id, name }) {
RoomRoles.update({
'u._id': _id,
}, {
$set: {
'u.name': name,
},
}, {
multi: true,
});
});
});