X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fsearch%2Fmeilisearch.ex;h=8fcf9310a2b60ddb594dc71929ce4501d8ec0fa2;hb=18bf82d7479b0bb767a657e1b7447529f9c2884f;hp=3db65f261c8e9166010a74d595162cd857b19406;hpb=7989b84d010d74123ee78f68fda4bc21746d4f87;p=akkoma diff --git a/lib/pleroma/search/meilisearch.ex b/lib/pleroma/search/meilisearch.ex index 3db65f261..8fcf9310a 100644 --- a/lib/pleroma/search/meilisearch.ex +++ b/lib/pleroma/search/meilisearch.ex @@ -128,7 +128,7 @@ defmodule Pleroma.Search.Meilisearch do trimmed end - if String.length(content) > 1 do + if String.length(content) > 1 and not is_nil(data["published"]) do {:ok, published, _} = DateTime.from_iso8601(data["published"]) %{ @@ -153,11 +153,12 @@ defmodule Pleroma.Search.Meilisearch do ) with {:ok, res} <- result, - true <- Map.has_key?(res, "uid") do - # Do nothing + true <- Map.has_key?(res, "taskUid") do + {:ok, res} else - _ -> + err -> Logger.error("Failed to add activity #{activity.id} to index: #{inspect(result)}") + {:error, err} end end end