Add follow request banner on account header (#20785)

* Add requested_by to relationship maps

* Display whether an account has requested to follow you on their profile
This commit is contained in:
Claire
2022-12-15 18:50:11 +01:00
committed by GitHub
parent 7a3c6bb888
commit 70415714f1
10 changed files with 127 additions and 4 deletions

View File

@ -44,6 +44,10 @@ module AccountInteractions
end
end
def requested_by_map(target_account_ids, account_id)
follow_mapping(FollowRequest.where(account_id: target_account_ids, target_account_id: account_id), :account_id)
end
def endorsed_map(target_account_ids, account_id)
follow_mapping(AccountPin.where(account_id: account_id, target_account_id: target_account_ids), :target_account_id)
end