Revert to previous tag_validator behavior
This paritally reverts commit9710063fdcand reverts commit7ddae61414See thread: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/4358#note_112761
This commit is contained in:
parent
7ddae61414
commit
dc26f74961
2 changed files with 2 additions and 8 deletions
|
|
@ -50,13 +50,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.TagValidator do
|
|||
end
|
||||
|
||||
def changeset(struct, %{"type" => "Hashtag", "name" => name} = data) do
|
||||
name =
|
||||
case name do
|
||||
"#" <> name -> name
|
||||
name -> name
|
||||
end
|
||||
|> String.downcase()
|
||||
|
||||
name = String.downcase(name)
|
||||
data = Map.put(data, "name", name)
|
||||
|
||||
struct
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.NoteHandlingTest do
|
|||
assert match?(
|
||||
%{
|
||||
"href" => "http://mastodon.example.org/tags/moo",
|
||||
"name" => "moo",
|
||||
"name" => "#moo",
|
||||
"type" => "Hashtag"
|
||||
},
|
||||
Enum.at(object.data["tag"], 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue