Apply suggestions to 2 files.
This commit is contained in:
parent
286204913d
commit
9710063fdc
2 changed files with 8 additions and 11 deletions
|
|
@ -93,16 +93,8 @@ defmodule Pleroma.Application do
|
|||
# Disable warnings_as_errors at runtime, it breaks Phoenix live reload
|
||||
# due to protocol consolidation warnings
|
||||
# :warnings_as_errors is deprecated via Code.compiler_options/2 since 1.18
|
||||
if elixir_version = System.version() do
|
||||
[major, minor] =
|
||||
elixir_version
|
||||
|> String.split(".")
|
||||
|> Enum.map(&String.to_integer/1)
|
||||
|> Enum.take(2)
|
||||
|
||||
if major == 1 and minor < 18 do
|
||||
Code.compiler_options(warnings_as_errors: false)
|
||||
end
|
||||
if Version.compare(System.version(), "1.18.0") == :lt do
|
||||
Code.compiler_options(warnings_as_errors: false)
|
||||
end
|
||||
|
||||
# Define workers and child supervisors to be supervised
|
||||
|
|
|
|||
|
|
@ -50,7 +50,12 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.TagValidator do
|
|||
end
|
||||
|
||||
def changeset(struct, %{"type" => "Hashtag", "name" => name} = data) do
|
||||
name = String.downcase(name)
|
||||
name =
|
||||
case name do
|
||||
"#" <> name -> name
|
||||
name -> name
|
||||
end
|
||||
|
||||
|
||||
data = Map.put(data, "name", name)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue