diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-05-31 14:42:15 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-06-16 15:54:22 +0300 |
commit | 32c6576b600e2f24310f429f4b2391f95a5b5ba0 (patch) | |
tree | d657b3af0d48fbb00504254d416876390b046d6a /lib | |
parent | e1603ac8fee2a660c3dc510dee5967e0fd1bbd98 (diff) | |
download | pleroma-32c6576b600e2f24310f429f4b2391f95a5b5ba0.tar.gz |
naming
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/config/config_db.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/config/config_db.ex b/lib/pleroma/config/config_db.ex index 70be17ecf..30bd51b05 100644 --- a/lib/pleroma/config/config_db.ex +++ b/lib/pleroma/config/config_db.ex @@ -331,7 +331,7 @@ defmodule Pleroma.ConfigDB do def string_to_elixir_types(":" <> atom), do: String.to_atom(atom) def string_to_elixir_types(value) do - if is_module_name?(value) do + if module_name?(value) do String.to_existing_atom("Elixir." <> value) else value @@ -373,8 +373,8 @@ defmodule Pleroma.ConfigDB do end end - @spec is_module_name?(String.t()) :: boolean() - def is_module_name?(string) do + @spec module_name?(String.t()) :: boolean() + def module_name?(string) do Regex.match?(~r/^(Pleroma|Phoenix|Tesla|Quack|Ueberauth|Swoosh)\./, string) or string in ["Oban", "Ueberauth", "ExSyslogger"] end |