From 82e7988afcde5b19b99ad9ecf7973560a8a17f7f Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 26 Oct 2018 12:59:59 +0200 Subject: [PATCH] Fix missing `mention` argument when processing incoming Create activities (#9114) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix missing `mention` argument when processing incoming Create activities * Fix typo (param → params) --- app/lib/activitypub/activity/create.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 92cdf45787..ea9017b827 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -90,11 +90,11 @@ class ActivityPub::Activity::Create < ActivityPub::Activity # If the payload was delivered to a specific inbox, the inbox owner must have # access to it, unless they already have access to it anyway - return if @options[:delivered_to_account_id].nil? || @mentions.any? { mention.account_id == @options[:delivered_to_account_id] } + return if @options[:delivered_to_account_id].nil? || @mentions.any? { |mention| mention.account_id == @options[:delivered_to_account_id] } @mentions << Mention.new(account_id: @options[:delivered_to_account_id], silent: true) - return unless @param[:visibility] == :direct + return unless @params[:visibility] == :direct @params[:visibility] = :limited end