bigbluebutton-Github/bigbluebutton-html5/imports/api/users/server/modifiers/updateSpeechLocale.js
Pedro Beschorner Marin fb48e61d6d feat(captions): add talking indicator feedback
Inform other users about who are the current talkers with the speech
recognition enabled.
2022-07-20 17:20:51 +00:00

26 lines
566 B
JavaScript

import Logger from '/imports/startup/server/logger';
import Users from '/imports/api/users';
export default function updateSpeechLocale(meetingId, userId, locale) {
const selector = {
meetingId,
userId,
};
const modifier = {
$set: {
speechLocale: locale,
},
};
try {
const numberAffected = Users.update(selector, modifier);
if (numberAffected) {
Logger.info(`Updated speech locale=${locale} userId=${userId} meetingId=${meetingId}`);
}
} catch (err) {
Logger.error(`Updating speech locale: ${err}`);
}
}