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/internal.js

21 lines
399 B

import { Subscriptions } from '../../../models';
export class AppInternalBridge {
constructor(orch) {
this.orch = orch;
}
getUsernamesOfRoomById(roomId) {
const records = Subscriptions.findByRoomIdWhenUsernameExists(roomId, {
fields: {
'u.username': 1,
},
}).fetch();
if (!records || records.length === 0) {
return [];
}
return records.map((s) => s.u.username);
}
}