2021-04-27 05:05:06 +08:00
|
|
|
import Auth from '/imports/ui/services/auth';
|
2021-10-20 04:35:39 +08:00
|
|
|
import Meetings from '/imports/api/meetings';
|
2021-04-27 05:05:06 +08:00
|
|
|
|
2021-08-31 09:58:35 +08:00
|
|
|
export default function getFromMeetingSettings(setting, defaultValue) {
|
2021-04-27 05:05:06 +08:00
|
|
|
const prop = Meetings.findOne(
|
|
|
|
{ meetingId: Auth.meetingID },
|
2024-03-26 19:57:28 +08:00
|
|
|
{ fields: { 'metadata': 1 } },
|
|
|
|
).metadata;
|
2021-08-31 09:58:35 +08:00
|
|
|
const value = prop.metadata ? prop.metadata[setting] : undefined;
|
2021-04-27 05:05:06 +08:00
|
|
|
|
|
|
|
return value || defaultValue;
|
|
|
|
}
|