- def ensure_scrubbed_html(
- content,
- scrubbers
- ) do
- {:commit, HTML.filter_tags(content, scrubbers)}
+ def delete(%Object{data: %{"id" => id}} = object) do
+ with {:ok, _obj} = swap_object_with_tombstone(object),
+ deleted_activity = Activity.delete_by_ap_id(id),
+ {:ok, true} <- Cachex.del(:object_cache, "object:#{id}") do
+ {:ok, object, deleted_activity}
+ end