* VRFS-2429 - remove empty session; VRFS-1344 - prompt when joining session that is currently recording
This commit is contained in:
parent
dac2910008
commit
92956c4ee7
|
|
@ -371,6 +371,14 @@
|
|||
if(response["errors"] && response["errors"]["tracks"] && response["errors"]["tracks"][0] == "Please select at least one track") {
|
||||
app.notifyAlert("No Inputs Configured", $('<span>You will need to reconfigure your audio device.</span>'));
|
||||
}
|
||||
else if(response["errors"] && response["errors"]["music_session"] && response["errors"]["music_session"][0] == ["is currently recording"]) {
|
||||
promptLeave = false;
|
||||
context.window.location = "/client#/findSession";
|
||||
app.notify( { title: "Unable to Join Session", text: "The session is currently recording." }, null, true);
|
||||
}
|
||||
else {
|
||||
app.notifyServerError(xhr, 'Unable to Join Session');
|
||||
}
|
||||
}
|
||||
else {
|
||||
app.notifyServerError(xhr, 'Unable to Join Session');
|
||||
|
|
@ -396,7 +404,12 @@
|
|||
if(screenActive) {
|
||||
// this path is possible if FTUE is invoked on session page, and they cancel
|
||||
sessionModel.leaveCurrentSession()
|
||||
.fail(app.ajaxError);
|
||||
.fail(function(jqXHR) {
|
||||
if(jqXHR.status != 404) {
|
||||
logger.debug("leave session failed");
|
||||
app.ajaxError(arguments)
|
||||
}
|
||||
});
|
||||
}
|
||||
screenActive = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -184,10 +184,10 @@
|
|||
leaveSessionRest(currentSessionId)
|
||||
.done(function() {
|
||||
sessionChanged();
|
||||
deferred.resolve(arguments);
|
||||
deferred.resolve(arguments[0], arguments[1], arguments[2]);
|
||||
})
|
||||
.fail(function() {
|
||||
deferred.reject(arguments);
|
||||
deferred.reject(arguments[0], arguments[1], arguments[2]);
|
||||
});
|
||||
|
||||
// 'unregister' for callbacks
|
||||
|
|
|
|||
|
|
@ -133,6 +133,11 @@
|
|||
rest.getSession(sessionId)
|
||||
.done(function(response) {
|
||||
session = response;
|
||||
if(session && session.recording) {
|
||||
context.JK.app.notify( { title: "Unable to Join Session", text: "The session is currently recording." }, null, true);
|
||||
return;
|
||||
}
|
||||
|
||||
if ("invitations" in session) {
|
||||
var invitation;
|
||||
// user has invitations for this session
|
||||
|
|
|
|||
Loading…
Reference in New Issue