- accepted_function =
- if Keyword.get(opts, :no_cachex, false) do
- # A special function to make this usable in a migration.
- fn activity ->
- with %User{} = follower <- User.get_by_ap_id(activity.data["actor"]),
- %User{} = followed <- User.get_by_ap_id(activity.data["object"]) do
- Pleroma.FollowingRelationship.following?(follower, followed)
- end
- end
- else
- &Activity.follow_accepted?/1
- end
-
- if accepted_function.(activity) do