- def swap_data_with_tombstone(activity) do
- with tombstone = get_tombstone(activity),
- Notification.clear(activity),
- {:ok, changed_activity} =
- activity
- |> change(%{data: tombstone})
- |> Repo.update() do
- {:ok, changed_activity}
- end
+ def all_by_actor_and_id(actor, status_ids) do
+ Activity
+ |> where([s], s.id in ^status_ids)
+ |> where([s], s.actor == ^actor)
+ |> Repo.all()