From 3252ed0f544bf5e1cc6d3e09bfa1a4866889ec91 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 30 Dec 2021 18:03:09 +0000 Subject: [PATCH] format --- lib/pleroma/elasticsearch/store.ex | 3 +++ lib/pleroma/web/activity_pub/side_effects.ex | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/elasticsearch/store.ex b/lib/pleroma/elasticsearch/store.ex index 01561a0df..648bf1642 100644 --- a/lib/pleroma/elasticsearch/store.ex +++ b/lib/pleroma/elasticsearch/store.ex @@ -129,6 +129,7 @@ def bulk_post(data, :activities) do {:error, %{reason: err}} -> Logger.error("Could not bulk put activity: #{err}") :skipped + {:ok, %{body: body}} -> IO.inspect(body) :skipped @@ -159,6 +160,7 @@ def bulk_post(data, :users) do {:error, %{reason: err}} -> Logger.error("Could not bulk put users: #{err}") :skipped + {:ok, %{body: body}} -> IO.inspect(body) :skipped @@ -188,6 +190,7 @@ def bulk_post(data, :hashtags) when is_list(data) do {:error, %{reason: err}} -> Logger.error("Could not bulk put hashtags: #{err}") :skipped + {:ok, %{body: body}} -> IO.inspect(body) :skipped diff --git a/lib/pleroma/web/activity_pub/side_effects.ex b/lib/pleroma/web/activity_pub/side_effects.ex index 212588a0b..9b17eba95 100644 --- a/lib/pleroma/web/activity_pub/side_effects.ex +++ b/lib/pleroma/web/activity_pub/side_effects.ex @@ -542,7 +542,9 @@ def handle_after_transaction(%Pleroma.Activity{data: %{"type" => "Create"}} = ac Pleroma.Elasticsearch.put_by_id(:activity, activity.id) end - def handle_after_transaction(%Pleroma.Activity{data: %{"type" => "Delete", "deleted_activity_id" => id}}) do + def handle_after_transaction(%Pleroma.Activity{ + data: %{"type" => "Delete", "deleted_activity_id" => id} + }) do Pleroma.Elasticsearch.delete_by_id(:activity, id) end