projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'feature/s3-force-media-proxy' into 'develop'
[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 ed1fe1ad9dda979d1ba9098eb128c6b4c805239f..2a5a2cc15fcfb53efe6f2d3f7a5e00060a1d21dd 100644
(file)
--- a/
lib/pleroma/web/common_api/utils.ex
+++ b/
lib/pleroma/web/common_api/utils.ex
@@
-89,8
+89,8
@@
defmodule Pleroma.Web.CommonAPI.Utils do
def add_attachments(text, attachments) do
attachment_text =
Enum.map(attachments, fn
def add_attachments(text, attachments) do
attachment_text =
Enum.map(attachments, fn
- %{"url" => [%{"href" => href} | _]} ->
- name = URI.decode(Path.basename(href))
+ %{"url" => [%{"href" => href} | _]}
= attachment
->
+ name =
attachment["name"] ||
URI.decode(Path.basename(href))
href = MediaProxy.url(href)
"<a href=\"#{href}\" class='attachment'>#{shortname(name)}</a>"
href = MediaProxy.url(href)
"<a href=\"#{href}\" class='attachment'>#{shortname(name)}</a>"