bigbluebutton-Github/bigbluebutton-html5/imports/ui/services/meeting-settings/index.js
2024-03-26 08:57:28 -03:00

13 lines
385 B
JavaScript

import Auth from '/imports/ui/services/auth';
import Meetings from '/imports/api/meetings';
export default function getFromMeetingSettings(setting, defaultValue) {
const prop = Meetings.findOne(
{ meetingId: Auth.meetingID },
{ fields: { 'metadata': 1 } },
).metadata;
const value = prop.metadata ? prop.metadata[setting] : undefined;
return value || defaultValue;
}