Merge branch 'feature/funkwhale-audio' into 'develop'
[akkoma] / lib / pleroma / config / config_db.ex
index be66880951b57cefcfed87564f5c4b6f9abf5923..2b43d4c365f91586b5e0a9b569958fce83048a74 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.ConfigDB do
@@ -236,15 +236,7 @@ defmodule Pleroma.ConfigDB do
   end
 
   @spec from_string(String.t()) :: atom() | no_return()
-  def from_string(":" <> entity), do: String.to_existing_atom(entity)
-
-  def from_string(entity) when is_binary(entity) do
-    if is_module_name?(entity) do
-      String.to_existing_atom("Elixir.#{entity}")
-    else
-      entity
-    end
-  end
+  def from_string(string), do: do_transform_string(string)
 
   @spec convert(any()) :: any()
   def convert(entity), do: do_convert(entity)