diff options
author | Tusooa Zhu <tusooa@kazv.moe> | 2021-12-17 14:17:51 -0500 |
---|---|---|
committer | Tusooa Zhu <tusooa@kazv.moe> | 2021-12-17 14:17:51 -0500 |
commit | 3d41ccc47bd59cb17e7c18a368e3da3fd885ff29 (patch) | |
tree | c1577b4311211eba0cc0cddeb2906502e290cd3a /lib/pleroma/web/activity_pub | |
parent | 8cfd527589517176add18bb130e3d7d5875e74e3 (diff) | |
download | pleroma-3d41ccc47bd59cb17e7c18a368e3da3fd885ff29.tar.gz |
Allow updating accepted follow activities in Web.ActivityPub.Utils.update_follow_state_for_all/2
Mastodon uses the Reject activity also for the purpose of removing
a follower, in addition to reject a follow request. We should
also update the original Follow activity in this case.
Diffstat (limited to 'lib/pleroma/web/activity_pub')
-rw-r--r-- | lib/pleroma/web/activity_pub/utils.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex index 1df53f79a..c1f6b2b49 100644 --- a/lib/pleroma/web/activity_pub/utils.ex +++ b/lib/pleroma/web/activity_pub/utils.ex @@ -446,7 +446,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do |> Activity.Queries.by_type() |> Activity.Queries.by_actor(actor) |> Activity.Queries.by_object_id(object) - |> where(fragment("data->>'state' = 'pending'")) + |> where(fragment("data->>'state' = 'pending'") or fragment("data->>'state' = 'accept'")) |> update(set: [data: fragment("jsonb_set(data, '{state}', ?)", ^state)]) |> Repo.update_all([]) |