From: ThibG Date: Mon, 4 Nov 2019 12:02:27 +0000 (+0100) Subject: Fix code referencing wrong class (#12263) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=e37358b3bcc6d8a5d29e2bcdcc862e0561abec17;p=mastodon.git Fix code referencing wrong class (#12263) For some reason, I have seen this only triggered here: https://circleci.com/gh/tootsuite/mastodon/98324?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-checks-link But Follow.find_by referenced the ActivityPub::Activity::Follow class instead of the model class. --- diff --git a/app/lib/activitypub/activity.rb b/app/lib/activitypub/activity.rb index 5cd48a6ae..cdd406043 100644 --- a/app/lib/activitypub/activity.rb +++ b/app/lib/activitypub/activity.rb @@ -158,7 +158,7 @@ class ActivityPub::Activity end def follow_from_object - @follow ||= Follow.find_by(target_account: @account, uri: object_uri) unless object_uri.nil? + @follow ||= ::Follow.find_by(target_account: @account, uri: object_uri) unless object_uri.nil? end def fetch_remote_original_status