[#1559] Support for "follow_request" notifications (configurable).

(Not currently supported by PleromaFE, thus disabled by default).
This commit is contained in:
Ivan Tashkinov 2020-04-07 21:52:32 +03:00
commit 1a4875adfa
9 changed files with 117 additions and 36 deletions

View file

@ -699,6 +699,8 @@ defmodule Pleroma.User do
def needs_update?(_), do: true
@spec maybe_direct_follow(User.t(), User.t()) :: {:ok, User.t()} | {:error, String.t()}
# "Locked" (self-locked) users demand explicit authorization of follow requests
def maybe_direct_follow(%User{} = follower, %User{local: true, locked: true} = followed) do
follow(follower, followed, "pending")
end