Apply suggestion to lib/pleroma/web/activity_pub/utils.ex
authorMaksim <parallel588@gmail.com>
Wed, 4 Sep 2019 18:35:01 +0000 (18:35 +0000)
committerMaksim <parallel588@gmail.com>
Wed, 4 Sep 2019 18:35:01 +0000 (18:35 +0000)
lib/pleroma/web/activity_pub/utils.ex

index 2de02f607704c2209e18c768f10dd20a885cd30f..011acd48e7148743b07a04565c4e017366059eb9 100644 (file)
@@ -359,7 +359,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
    "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([])