X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/425f42dd8008d9962c7bee0cadfbdcf33e1f4f95..773ef195d42f74ef20fb59f5baf6262102e6ab38:/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