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/lib/server/functions/getStatusText.js

19 lines
309 B

import { Users } from '../../../models/server';
export const getStatusText = function(userId) {
if (!userId) {
return undefined;
}
const fields = {
statusText: 1,
};
const options = {
fields,
limit: 1,
};
const data = Users.findOneById(userId, options);
return data && data.statusText;
};