Apply suggestion to lib/pleroma/web/common_api/utils.ex

This commit is contained in:
Roman Chvanikov 2020-05-22 15:44:10 +00:00
parent 8eb1dfadca
commit 5d60b25e69

View file

@ -397,7 +397,7 @@ def to_masto_date(_), do: ""
defp shortname(name) do
with max_length when max_length > 0 <-
Pleroma.Config.get([Pleroma.Upload, :filename_display_max_length], 30),
Config.get([Pleroma.Upload, :filename_display_max_length], 30),
true <- String.length(name) > max_length do
String.slice(name, 0..max_length) <> ""
else