bigbluebutton-Github/bigbluebutton-html5/imports/api/captions/server/methods/takeOwnership.js
Pedro Beschorner Marin f7793bdc4b fix(closed captions): avoid padId subscription
Remove padIds from the closed captions MongoDB collection subscription.

Users now have to fetch the padId from Meteor when needed. Meteor is
responsible for checking the user's access level and return the
proper id.
2021-10-04 14:35:53 -03:00

20 lines
679 B
JavaScript

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';
import Logger from '/imports/startup/server/logger';
export default function takeOwnership(locale) {
try {
const { meetingId, requesterUserId } = extractCredentials(this.userId);
check(locale, String);
check(meetingId, String);
check(requesterUserId, String);
updateOwnerId(meetingId, requesterUserId, locale);
} catch (err) {
Logger.error(`Exception while invoking method takeOwnership ${err.stack}`);
}
}