bigbluebutton-Github/bigbluebutton-html5/imports/api/captions/server/methods/takeOwnership.js

20 lines
679 B
JavaScript
Raw Normal View History

import { check } from 'meteor/check';
import Captions from '/imports/api/captions';
import updateOwnerId from '/imports/api/captions/server/modifiers/updateOwnerId';
import { extractCredentials } from '/imports/api/common/server/helpers';
2021-05-05 01:34:31 +08:00
import Logger from '/imports/startup/server/logger';
export default function takeOwnership(locale) {
2021-05-05 01:34:31 +08:00
try {
const { meetingId, requesterUserId } = extractCredentials(this.userId);
2021-05-05 01:34:31 +08:00
check(locale, String);
check(meetingId, String);
check(requesterUserId, String);
updateOwnerId(meetingId, requesterUserId, locale);
2021-05-05 01:34:31 +08:00
} catch (err) {
Logger.error(`Exception while invoking method takeOwnership ${err.stack}`);
}
}