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/apps/server/bridges/users.js

23 lines
594 B

import { Users } from '../../../models/server';
export class AppUserBridge {
constructor(orch) {
this.orch = orch;
}
async getById(userId, appId) {
this.orch.debugLog(`The App ${ appId } is getting the userId: "${ userId }"`);
return this.orch.getConverters().get('users').convertById(userId);
}
async getByUsername(username, appId) {
this.orch.debugLog(`The App ${ appId } is getting the username: "${ username }"`);
return this.orch.getConverters().get('users').convertByUsername(username);
}
async getActiveUserCount() {
return Users.getActiveLocalUserCount();
}
}