diff --git a/lib/diaspora/user/receiving.rb b/lib/diaspora/user/receiving.rb index d6b86ef1b..a28537fd1 100644 --- a/lib/diaspora/user/receiving.rb +++ b/lib/diaspora/user/receiving.rb @@ -75,7 +75,7 @@ module Diaspora def receive_retraction retraction if retraction.type == 'Person' unless retraction.person.id.to_s == retraction.post_id.to_s - Rails.logger.info("event=receive status=abort reason='sender is not the person he is trying to retract' recipient=#{self.diaspora_handle} sender=#{salmon_author.diaspora_handle} payload_type=#{retraction.class} retraction_type=person") + Rails.logger.info("event=receive status=abort reason='sender is not the person he is trying to retract' recipient=#{self.diaspora_handle} sender=#{retraction.person.diaspora_handle} payload_type=#{retraction.class} retraction_type=person") return end disconnected_by visible_person_by_id(retraction.post_id) @@ -147,7 +147,7 @@ module Diaspora Rails.logger.info("event=receive payload_type=#{post.class} update=false status=complete sender=#{post.diaspora_handle}") post else - Rails.logger.info("event=receive payload_type=#{post.class} update=true status=abort sender=#{post.diaspora_handle} reason='update not from post owner' existing_post=#{known_post.id}") + Rails.logger.info("event=receive payload_type=#{post.class} update=true status=abort sender=#{post.diaspora_handle} reason='update not from post owner' existing_post=#{post.id}") end end diff --git a/spec/controllers/status_message_controller_spec.rb b/spec/controllers/status_message_controller_spec.rb index 61f3d19b0..5f863d30e 100644 --- a/spec/controllers/status_message_controller_spec.rb +++ b/spec/controllers/status_message_controller_spec.rb @@ -18,6 +18,8 @@ describe StatusMessagesController do request.env["HTTP_REFERER"] = "" sign_in :user, user @controller.stub!(:current_user).and_return(user) + + EM.stub!(:next_tick).with(&block).and_return{|x| x.call} end describe '#show' do