bigbluebutton-Github/bigbluebutton-html5/imports/ui/services/users-settings/index.js
João Francisco Siebel ebad6cf6a4 remove debug
2018-09-14 14:53:29 -03:00

21 lines
447 B
JavaScript

import Auth from '/imports/ui/services/auth';
import UserSettings from '/imports/api/users-settings';
export default function getFromUserSettings(setting, defaultValue) {
const { meetingID: meetingId, userID: userId } = Auth;
const selector = {
meetingId,
userId,
setting,
};
const userSetting = UserSettings.findOne(selector);
if (userSetting !== undefined) {
return userSetting.value;
}
return defaultValue;
}