Utils: Split update_follow_state and update_follow_state_for_all.

This commit is contained in:
lain 2019-06-05 16:43:35 +02:00
commit ad19bfc7fe
2 changed files with 50 additions and 2 deletions

View file

@ -376,8 +376,8 @@ defmodule Pleroma.Web.ActivityPub.Utils do
@doc """
Updates a follow activity's state (for locked accounts).
"""
def update_follow_state(
%Activity{data: %{"actor" => actor, "object" => object, "state" => "pending"}} = activity,
def update_follow_state_for_all(
%Activity{data: %{"actor" => actor, "object" => object}} = activity,
state
) do
try do