Skip to content

Commit

Permalink
end meeting for all
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick Barrows committed Mar 5, 2025
1 parent 6bfd262 commit 0abf6c5
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion TaskManagementGadget.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ finesse.modules.TaskManagementGadget = (function($) {

const videoIframe = document.getElementById('video-iframe');
const registarIframe = document.getElementById('registar-work');
const mainVideoURl = 'https://9cba-38-64-189-37.ngrok-free.app';
const mainVideoURl = 'https://c259-38-64-189-37.ngrok-free.app';

if (buttonId === 'startButton') {
console.log ('vvazquez: Start button clicked');
Expand Down Expand Up @@ -661,6 +661,35 @@ finesse.modules.TaskManagementGadget = (function($) {
*/
handleMediaDialogsDelete = function(dialog) {
if (mrdID === dialog._data.mediaProperties.mediaId) {
// vvazquez
console.log ('vvazquez: Ending Meeting');
// send end meeting request
const myCallVariables = dialog.getMediaProperties();
const videoDestination = myCallVariables.user_videoDestination;
const accessToken = myCallVariables.user_videoToken;
const mainVideoURl = 'https://c259-38-64-189-37.ngrok-free.app';

console.log ('vvazquez: ', accessToken, videoDestination);
let myHeaders = {
"Content-Type": "application/json"
}

let myBody = JSON.stringify({
"accessToken": accessToken,
"destination": videoDestination
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: myBody
};

fetch(mainVideoURl+'/end-meeting', requestOptions)
.then((response) => response.text())
.then((result) => console.log('vvazquez: ', result))
.catch((error) => console.error('vvazquez error: ', error));

// end of vvazquez
displayDialog(dialog);
removeCurrentTab(dialog.getId());
adjustGadgetHeight();
Expand Down

0 comments on commit 0abf6c5

Please sign in to comment.