Fix hashtag search
authorMark Felder <feld@FreeBSD.org>
Fri, 2 Nov 2018 19:38:57 +0000 (19:38 +0000)
committerMark Felder <feld@FreeBSD.org>
Fri, 2 Nov 2018 19:38:57 +0000 (19:38 +0000)
When we lowercase the search it will succesfully do a case insenstive
match. Now #Linux will match #linux and #LINUX whereas previously it
would only match the exact case.

lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index e03027be7e418dda06b3468f4cfe0bcf8360d9aa..f6cf081fdd707954c7b6e083e2cffdf332093b3c 100644 (file)
@@ -508,6 +508,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
       |> Map.put("type", "Create")
       |> Map.put("local_only", local_only)
       |> Map.put("blocking_user", user)
+      |> Map.put("tag", String.downcase(params["tag"]))
 
     activities =
       ActivityPub.fetch_public_activities(params)