diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2018-12-11 15:31:52 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2018-12-12 09:09:19 +0300 |
commit | 89b3729afa130a62a47ed6372350ebfc5acb4064 (patch) | |
tree | 89fba8fe2ed33bb25ef554f67e4659e255f81709 /lib/pleroma/web/common_api/utils.ex | |
parent | 2999a08e3590c43c623730b0cbf6b93045ac08c1 (diff) | |
download | pleroma-89b3729afa130a62a47ed6372350ebfc5acb4064.tar.gz |
fix warnings
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 8f2625cef..ce0926b99 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -1,11 +1,12 @@ defmodule Pleroma.Web.CommonAPI.Utils do - alias Pleroma.{Repo, Object, Formatter, Activity} + alias Calendar.Strftime + alias Comeonin.Pbkdf2 + alias Pleroma.{Activity, Formatter, Object, Repo} + alias Pleroma.User + alias Pleroma.Web alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.Endpoint alias Pleroma.Web.MediaProxy - alias Pleroma.User - alias Calendar.Strftime - alias Comeonin.Pbkdf2 # This is a hack for twidere. def get_by_id_or_ap_id(id) do @@ -148,7 +149,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do |> Enum.sort_by(fn {tag, _} -> -String.length(tag) end) Enum.reduce(tags, text, fn {full, tag}, text -> - url = "<a href='#{Pleroma.Web.base_url()}/tag/#{tag}' rel='tag'>##{tag}</a>" + url = "<a href='#{Web.base_url()}/tag/#{tag}' rel='tag'>##{tag}</a>" String.replace(text, full, url) end) end |