From a58bfd1349efc6f95392f50be6821b4717403658 Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Fri, 13 Mar 2015 21:01:54 +0000 Subject: [PATCH] fix for the logoutURL - the string had different spellings --- bigbluebutton-html5/app/lib/router.coffee | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/bigbluebutton-html5/app/lib/router.coffee b/bigbluebutton-html5/app/lib/router.coffee index cb86615a9c..89df2f6997 100755 --- a/bigbluebutton-html5/app/lib/router.coffee +++ b/bigbluebutton-html5/app/lib/router.coffee @@ -30,14 +30,26 @@ # done subscribing onLoadComplete() + handleLogourUrlError = () -> + alert "Error: could not find the logoutURL" + setInSession("logoutURL", document.location.hostname) + return + # obtain the logoutURL a = $.ajax({dataType: 'json', url: '/bigbluebutton/api/enter'}) a.done (data) -> - setInSession("logoutURL", data.response.logoutURL) + if data.response.logoutURL? # for a meeting with 0 users + setInSession("logoutURL", data.response.logoutURL) + return + else + if data.response.logoutUrl? # for a running meeting + setInSession("logoutURL", data.response.logoutUrl) + return + else + handleLogourUrlError() a.fail (data, textStatus, errorThrown) -> - alert "Error: could not find the logoutURL" - setInSession("logoutURL", document.location.hostname) + handleLogourUrlError() @render('main')