bugfix/follow-state (#104)

Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/104
This commit is contained in:
floatingghost 2022-07-23 18:58:45 +00:00 committed by Tusooa Zhu
commit f2a9285ff0
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
3 changed files with 52 additions and 4 deletions

View file

@ -1574,13 +1574,19 @@ defmodule Pleroma.User do
blocker
end
# clear any requested follows as well
# clear any requested follows from both sides as well
blocked =
case CommonAPI.reject_follow_request(blocked, blocker) do
{:ok, %User{} = updated_blocked} -> updated_blocked
nil -> blocked
end
blocker =
case CommonAPI.reject_follow_request(blocker, blocked) do
{:ok, %User{} = updated_blocker} -> updated_blocker
nil -> blocker
end
unsubscribe(blocked, blocker)
unfollowing_blocked = Config.get([:activitypub, :unfollow_blocked], true)