diff options
author | eugenijm <eugenijm@protonmail.com> | 2020-04-30 15:02:35 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-05-02 19:16:27 +0300 |
commit | 441e28f36562492ad076443c4d061b33fc0f9813 (patch) | |
tree | fc7c98667fe9557838f1087fd1a93a7052c2b007 /lib/pleroma/web/common_api/common_api.ex | |
parent | c75840f7b8a117e973713c8cb47523f09deaab79 (diff) | |
download | pleroma-441e28f36562492ad076443c4d061b33fc0f9813.tar.gz |
Dismiss the follow request notification on rejection
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r-- | lib/pleroma/web/common_api/common_api.ex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index c84782008..74e9e8cfa 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -7,6 +7,7 @@ defmodule Pleroma.Web.CommonAPI do alias Pleroma.ActivityExpiration alias Pleroma.Conversation.Participation alias Pleroma.FollowingRelationship + alias Pleroma.Notification alias Pleroma.Object alias Pleroma.ThreadMute alias Pleroma.User @@ -58,6 +59,7 @@ defmodule Pleroma.Web.CommonAPI do with %Activity{} = follow_activity <- Utils.fetch_latest_follow(follower, followed), {:ok, follow_activity} <- Utils.update_follow_state_for_all(follow_activity, "reject"), {:ok, _relationship} <- FollowingRelationship.update(follower, followed, :follow_reject), + {:ok, _notifications} <- Notification.dismiss(follow_activity), {:ok, _activity} <- ActivityPub.reject(%{ to: [follower.ap_id], |