Merge pull request #610 from jitsi/callstats_fix

Leaves the call when the hangup button is pressed
This commit is contained in:
yanas 2016-04-20 14:06:16 -05:00
commit 6bfb28f63f
1 changed files with 7 additions and 8 deletions

View File

@ -126,15 +126,14 @@ function muteLocalVideo (muted) {
* @param {boolean} [requestFeedback=false] if user feedback should be requested
*/
function hangup (requestFeedback = false) {
let promise = Promise.resolve();
if (requestFeedback) {
promise = APP.UI.requestFeedback();
}
promise.then(function () {
APP.conference._room.leave().then(() => {
connection.disconnect();
if (requestFeedback) {
return APP.UI.requestFeedback();
} else {
return Promise.resolve();
}
}).then(function () {
if (!config.enableWelcomePage) {
return;
}