Make attachment links configurable
Thanks @href!
This commit is contained in:
parent
ce2efd1ee2
commit
8c368d42a2
3 changed files with 2 additions and 2 deletions
|
@ -95,6 +95,7 @@ config :pleroma, Pleroma.Mailer,
|
||||||
older software for theses nicknames.
|
older software for theses nicknames.
|
||||||
* `max_pinned_statuses`: The maximum number of pinned statuses. `0` will disable the feature.
|
* `max_pinned_statuses`: The maximum number of pinned statuses. `0` will disable the feature.
|
||||||
* `autofollowed_nicknames`: Set to nicknames of (local) users that every new user should automatically follow.
|
* `autofollowed_nicknames`: Set to nicknames of (local) users that every new user should automatically follow.
|
||||||
|
* `no_attachment_links`: Set to true to disable automatically adding attachment link text to statuses
|
||||||
|
|
||||||
## :logger
|
## :logger
|
||||||
* `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog
|
* `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog
|
||||||
|
|
|
@ -103,7 +103,7 @@ def post(user, %{"status" => status} = data) do
|
||||||
attachments,
|
attachments,
|
||||||
tags,
|
tags,
|
||||||
get_content_type(data["content_type"]),
|
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], true)))
|
||||||
),
|
),
|
||||||
context <- make_context(inReplyTo),
|
context <- make_context(inReplyTo),
|
||||||
cw <- data["spoiler_text"],
|
cw <- data["spoiler_text"],
|
||||||
|
|
|
@ -341,7 +341,6 @@ def post_status(%{assigns: %{user: user}} = conn, %{"status" => _} = params) do
|
||||||
params =
|
params =
|
||||||
params
|
params
|
||||||
|> Map.put("in_reply_to_status_id", params["in_reply_to_id"])
|
|> Map.put("in_reply_to_status_id", params["in_reply_to_id"])
|
||||||
|> Map.put("no_attachment_links", true)
|
|
||||||
|
|
||||||
idempotency_key =
|
idempotency_key =
|
||||||
case get_req_header(conn, "idempotency-key") do
|
case get_req_header(conn, "idempotency-key") do
|
||||||
|
|
Loading…
Reference in a new issue