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) {
|
2024-04-09 04:54:19 +08:00
|
|
|
const meeting = Meetings.findOne(
|
2021-04-27 05:05:06 +08:00
|
|
|
{ meetingId: Auth.meetingID },
|
2024-04-09 04:54:19 +08:00
|
|
|
{ fields: { metadataProp: 1 } },
|
|
|
|
);
|
2021-04-27 05:05:06 +08:00
|
|
|
|
2024-04-09 04:54:19 +08:00
|
|
|
return meeting?.metadataProp?.metadata?.[setting] ?? defaultValue;
|
2021-04-27 05:05:06 +08:00
|
|
|
}
|