Apply suggestion to lib/pleroma/web/activity_pub/utils.ex

This commit is contained in:
Maksim 2019-09-04 18:35:01 +00:00
parent 8306078de1
commit e2011a667c
1 changed files with 1 additions and 1 deletions

View File

@ -359,7 +359,7 @@ def update_follow_state_for_all(
"Follow"
|> Activity.Queries.by_type()
|> Activity.Queries.by_actor(actor)
|> Activity.Queries.by_object_id(object["id"])
|> Activity.Queries.by_object_id(object)
|> where(fragment("data->>'state' = 'pending'"))
|> update(set: [data: fragment("jsonb_set(data, '{state}', ?)", ^state)])
|> Repo.update_all([])