Skip posts in indexer where publish date is nil
[akkoma] / lib / pleroma / search / elasticsearch / document_mappings / activity.ex
index 3a84e991b023f295fc561c86b58e54736b758a31..b77c6e0d296626708a189494186ce64a02b790a9 100644 (file)
@@ -30,7 +30,7 @@ defimpl Elasticsearch.Document, for: Pleroma.Activity 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"])
 
         %{