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/apps/meteor/app/lib/server/functions/getStatusText.ts

19 lines
347 B

import { Users } from '@rocket.chat/models';
export const getStatusText = async function (userId: string): Promise<string | undefined> {
if (!userId) {
return;
}
const projection = {
statusText: 1,
};
const options = {
projection,
limit: 1,
};
const data = await Users.findOneById(userId, options);
return data?.statusText;
};