projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add `account_activation_required` to /api/v1/instance
[akkoma]
/
lib
/
pleroma
/
web
/
common_api
/
utils.ex
diff --git
a/lib/pleroma/web/common_api/utils.ex
b/lib/pleroma/web/common_api/utils.ex
index 7be9d8caaadd2a720bb9b6d949aba4ff19ec0ca5..6ec489f9ad646c0eb8342df933416f122aec464a 100644
(file)
--- a/
lib/pleroma/web/common_api/utils.ex
+++ b/
lib/pleroma/web/common_api/utils.ex
@@
-397,7
+397,7
@@
defmodule Pleroma.Web.CommonAPI.Utils do
defp shortname(name) do
with max_length when max_length > 0 <-
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
true <- String.length(name) > max_length do
String.slice(name, 0..max_length) <> "…"
else
@@
-470,6
+470,8
@@
defmodule Pleroma.Web.CommonAPI.Utils do
|> Enum.map(& &1.ap_id)
recipients ++ subscriber_ids
|> Enum.map(& &1.ap_id)
recipients ++ subscriber_ids
+ else
+ _e -> recipients
end
end
end
end
@@
-481,6
+483,8
@@
defmodule Pleroma.Web.CommonAPI.Utils do
|> User.get_followers()
|> Enum.map(& &1.ap_id)
|> Enum.concat(recipients)
|> User.get_followers()
|> Enum.map(& &1.ap_id)
|> Enum.concat(recipients)
+ else
+ _e -> recipients
end
end
end
end