X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/425f42dd8008d9962c7bee0cadfbdcf33e1f4f95..4cf3c3b6ed7cc6ab0728b320afde5854489629fb:/app/controllers/messages_controller.rb diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index dce0099e5..a55690951 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -26,7 +26,7 @@ class MessagesController < ApplicationController @message.sender = current_user @message.sent_on = Time.now.getutc - if current_user.sent_messages.where("sent_on >= ?", Time.now.getutc - 1.hour).count >= MAX_MESSAGES_PER_HOUR + if current_user.sent_messages.where("sent_on >= ?", Time.now.getutc - 1.hour).count >= Settings.max_messages_per_hour flash[:error] = t ".limit_exceeded" render :action => "new" elsif @message.save @@ -34,6 +34,7 @@ class MessagesController < ApplicationController Notifier.message_notification(@message).deliver_later redirect_to :action => :inbox else + @title = t "messages.new.title" render :action => "new" end end