- def replies(activity, opts \\ []) do
- object = Object.normalize(activity)
-
- query =
- Activity
- |> Queries.by_type("Create")
- |> Queries.by_object_in_reply_to_id(object.data["id"], skip_preloading: true)
- |> order_by([activity], asc: activity.id)
+ @spec pinned_by_actor?(Activity.t()) :: boolean()
+ def pinned_by_actor?(%Activity{} = activity) do
+ actor = user_actor(activity)
+ activity.id in actor.pinned_activities
+ end