Add logic for keeping follow_request_count up-to-date on the follow,

`approve_friend_request`, and `deny_friend_request` actions.
Add follow_request_count to the user view.
This commit is contained in:
eugenijm 2019-02-10 02:26:29 +03:00
commit ecdf0657ba
9 changed files with 91 additions and 18 deletions

View file

@ -680,7 +680,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
{:ok, _activity} <-
ActivityPub.accept(%{
to: [follower.ap_id],
actor: followed.ap_id,
actor: followed,
object: follow_activity.data["id"],
type: "Accept"
}) do
@ -702,7 +702,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
{:ok, _activity} <-
ActivityPub.reject(%{
to: [follower.ap_id],
actor: followed.ap_id,
actor: followed,
object: follow_activity.data["id"],
type: "Reject"
}) do