Skip posts in indexer where publish date is nil
[akkoma] / lib / pleroma / search / meilisearch.ex
index 0f9182ffc5bbba069b960ecdd4e4b2e80c55d445..c36b8f7510275d6e6d7fbcf532cc47b81be6aaf2 100644 (file)
@@ -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,7 +153,7 @@ defmodule Pleroma.Search.Meilisearch do
         )
 
       with {:ok, res} <- result,
-           true <- Map.has_key?(res, "updateId") do
+           true <- Map.has_key?(res, "taskUid") do
         # Do nothing
       else
         _ ->