diff --git a/bigbluebutton-html5/imports/api/captions/server/methods/appendText.js b/bigbluebutton-html5/imports/api/captions/server/methods/appendText.js index 29b4358e6546652f7d6f392ed1c148bcda1b0602..3f4e3cb4df58959577a6826db61dd38909d4dd92 100644 --- a/bigbluebutton-html5/imports/api/captions/server/methods/appendText.js +++ b/bigbluebutton-html5/imports/api/captions/server/methods/appendText.js @@ -7,8 +7,10 @@ import { import { appendTextURL, } from '/imports/api/note/server/helpers'; +import { extractCredentials } from '/imports/api/common/server/helpers'; -export default function appendText(text, locale, meetingId) { +export default function appendText(text, locale) { + const { meetingId } = extractCredentials(this.userId); check(meetingId, String); check(text, String); check(locale, String); diff --git a/bigbluebutton-html5/imports/ui/components/captions/service.js b/bigbluebutton-html5/imports/ui/components/captions/service.js index 716d8b9301047cad081fb91ebb07fe0f18df2087..a7fe093c3556e63867e3a7f321dba3dba851997b 100644 --- a/bigbluebutton-html5/imports/ui/components/captions/service.js +++ b/bigbluebutton-html5/imports/ui/components/captions/service.js @@ -75,7 +75,7 @@ const formatEntry = (entry) => { }; const appendText = (text, locale) => { - makeCall('appendText', formatEntry(text), locale, Auth.meetingID); + makeCall('appendText', formatEntry(text), locale); }; const canIOwnThisPad = (ownerId) => { @@ -85,6 +85,8 @@ const canIOwnThisPad = (ownerId) => { return ownerId !== userID; }; +const getSpeechRecognitionAPI = () => window.SpeechRecognition || window.webkitSpeechRecognition; + const canIDictateThisPad = (ownerId) => { const { userID } = Auth; if (!CAPTIONS_CONFIG.enableDictation) return false; @@ -154,8 +156,6 @@ const formatCaptionsText = (text) => { const amIModerator = () => Users.findOne({ userId: Auth.userID }, { fields: { role: 1 } }).role === ROLE_MODERATOR; -const getSpeechRecognitionAPI = () => window.SpeechRecognition || window.webkitSpeechRecognition; - const initSpeechRecognition = (locale) => { const SpeechRecognitionAPI = getSpeechRecognitionAPI(); let recognition = null;