projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
de-group import/s
[akkoma]
/
lib
/
pleroma
/
web
/
common_api
/
common_api.ex
diff --git
a/lib/pleroma/web/common_api/common_api.ex
b/lib/pleroma/web/common_api/common_api.ex
index 2902905fd399c3c939aba11e49eb1dfc71f9b998..c0d6fb5c4743272b6be60f892c599030fa07a3c4 100644
(file)
--- a/
lib/pleroma/web/common_api/common_api.ex
+++ b/
lib/pleroma/web/common_api/common_api.ex
@@
-3,7
+3,10
@@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.CommonAPI do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.CommonAPI do
- alias Pleroma.{User, Repo, Activity, Object}
+ alias Pleroma.User
+ alias Pleroma.Repo
+ alias Pleroma.Activity
+ alias Pleroma.Object
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Formatter
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Formatter
@@
-103,7
+106,14
@@
defmodule Pleroma.Web.CommonAPI do
attachments,
tags,
get_content_type(data["content_type"]),
attachments,
tags,
get_content_type(data["content_type"]),
- Enum.member?([true, "true"], data["no_attachment_links"])
+ Enum.member?(
+ [true, "true"],
+ Map.get(
+ data,
+ "no_attachment_links",
+ Pleroma.Config.get([:instance, :no_attachment_links], false)
+ )
+ )
),
context <- make_context(inReplyTo),
cw <- data["spoiler_text"],
),
context <- make_context(inReplyTo),
cw <- data["spoiler_text"],
@@
-136,7
+146,7
@@
defmodule Pleroma.Web.CommonAPI do
actor: user,
context: context,
object: object,
actor: user,
context: context,
object: object,
- additional: %{"cc" => cc}
+ additional: %{"cc" => cc
, "directMessage" => visibility == "direct"
}
})
res
})
res