X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f0b2ed9bb6c1e153231b8088eabe6e3edcee9420..8445561fccd13404568910fdde56ddf4d7b19a18:/app/controllers/message_controller.rb?ds=inline diff --git a/app/controllers/message_controller.rb b/app/controllers/message_controller.rb index 29b74c848..d167755d4 100644 --- a/app/controllers/message_controller.rb +++ b/app/controllers/message_controller.rb @@ -4,9 +4,10 @@ class MessageController < ApplicationController before_action :authorize_web before_action :set_locale before_action :require_user - before_action :lookup_this_user, :only => [:new] + before_action :lookup_user, :only => [:new] before_action :check_database_readable before_action :check_database_writable, :only => [:new, :reply, :mark] + before_action :allow_thirdparty_images, :only => [:new, :read] # Allow the user to write a new message to another user. This action also # deals with the sending of that message to the other user when the user @@ -18,7 +19,7 @@ class MessageController < ApplicationController flash[:error] = t "message.new.limit_exceeded" else @message = Message.new(message_params) - @message.recipient = @this_user + @message.recipient = @user @message.sender = current_user @message.sent_on = Time.now.getutc @@ -30,7 +31,7 @@ class MessageController < ApplicationController end end - @message ||= Message.new(message_params.merge(:recipient => @this_user)) + @message ||= Message.new(message_params.merge(:recipient => @user)) @title = t "message.new.title" end