logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 119b2b847b76c7300bd71699d9f2e5676bdb0bb4
parent e20f74c71b078d706bc93632773f9b590d2fb018
Author: Ekaterina Vaartis <vaartis@kotobank.ch>
Date:   Sat, 27 Aug 2022 00:09:37 +0300

Instead of checking string length, explicitly check for "" and "."

Diffstat:

Mlib/pleroma/search/meilisearch.ex5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/pleroma/search/meilisearch.ex b/lib/pleroma/search/meilisearch.ex @@ -112,7 +112,7 @@ defmodule Pleroma.Search.Meilisearch do not is_nil(object.data["content"]) and (Pleroma.Constants.as_public() in object.data["to"] or Pleroma.Constants.as_public() in object.data["cc"]) and - String.length(object.data["content"]) > 1 do + object.data["content"] not in ["", "."] do data = object.data content_str = @@ -127,7 +127,8 @@ defmodule Pleroma.Search.Meilisearch do trimmed end - if String.length(content) > 1 do + # Make sure we have a non-empty string + if content != "" do {:ok, published, _} = DateTime.from_iso8601(data["published"]) %{