X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6c2432ae423c6744b8443c63d0e02e1ccc2d3011..a32f4c231e678dd02a4728355455547d3d20fe2a:/app/controllers/messages_controller.rb?ds=sidebyside diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index dce0099e5..5aa5aba70 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