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/server/lib/isUserIdFederated.ts

11 lines
335 B

import { isUserFederated } from '@rocket.chat/core-typings';
import { Users } from '@rocket.chat/models';
export const isUserIdFederated = async (userId: string): Promise<boolean> => {
const user = await Users.findOneById(userId, { projection: { federated: 1 } });
if (!user) {
return false;
}
return isUserFederated(user);
};