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/cloud/server/functions/userLoggedOut.js

19 lines
310 B

import { Users } from '../../../models';
export function userLoggedOut(userId) {
if (!userId) {
return false;
}
const user = Users.findOneById(userId);
if (user && user.services && user.services.cloud) {
Users.update(user._id, {
$unset: {
'services.cloud': 1,
},
});
}
return true;
}