diff --git a/app/assets/javascripts/shared.js.erb b/app/assets/javascripts/shared.js.erb
index dd7cc53e..5b8e4c5f 100644
--- a/app/assets/javascripts/shared.js.erb
+++ b/app/assets/javascripts/shared.js.erb
@@ -51,6 +51,13 @@ var showAlert = function(html, timeout_delay) {
}
};
+// remove flash alerts after 5 seconds
+var flashAlertDelayedDismiss = function() {
+ setTimeout(function(){
+ $('.flash-alerts').remove();
+ }, 5000);
+};
+
var displayRoomURL = function() {
$('.meeting-url').val(Meeting.getInstance().getURL());
};
@@ -78,4 +85,5 @@ $(document).on("turbolinks:load", function() {
if (isRoomOwner()) {
Notification.requestPermission();
}
+ flashAlertDelayedDismiss();
});
diff --git a/app/controllers/landing_controller.rb b/app/controllers/landing_controller.rb
index b02ed8aa..a955b0c5 100644
--- a/app/controllers/landing_controller.rb
+++ b/app/controllers/landing_controller.rb
@@ -23,12 +23,12 @@ class LandingController < ApplicationController
def resource
if params[:id].size > meeting_name_limit
redirect_to action: :index
- elsif params[:resource] == 'meetings'
+ elsif params[:resource] == 'meetings' && !params[:room_id]
render_meeting
elsif params[:resource] == 'rooms'
render_room
else
- render 'errors/error'
+ redirect_to root_url, flash: {danger: "An error occured"}
end
end
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index d213488d..d876d168 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -51,6 +51,16 @@ with BigBlueButton; if not, see