From 161c72d66d25bb8f5ff492e36a8521c701ab8afc Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Thu, 4 Jan 2018 02:08:57 +0900 Subject: Allow to dereference Follow object for ActivityPub (#5772) * Allow to dereference Follow object for ActivityPub * Accept IRI as object representation for Accept activity --- app/models/follow_request.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models') diff --git a/app/models/follow_request.rb b/app/models/follow_request.rb index ebf6959ce..33e5fec12 100644 --- a/app/models/follow_request.rb +++ b/app/models/follow_request.rb @@ -21,6 +21,10 @@ class FollowRequest < ApplicationRecord validates :account_id, uniqueness: { scope: :target_account_id } + def object_type + :follow + end + def authorize! account.follow!(target_account, reblogs: show_reblogs) MergeWorker.perform_async(target_account.id, account.id) -- cgit