X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2f9291ba5764fe104264ae7e3b6a361e11212e8b..7e925c3c00cc5944fc743faf9d1509fcd30df55d:/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