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.ts

19 lines
320 B

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