aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-08-04 10:42:52 -0500
committerMark Felder <feld@feld.me>2021-06-01 11:49:46 -0500
commitd6432a65da7ad11f1383d465370c11de5a2d7ddc (patch)
tree10c977a0ca4d5e1f35d92df8ace756dadc1d07b5 /lib
parent4a181982c34c774c9ed4b76ce1d95f6c33fce9d5 (diff)
downloadpleroma-d6432a65da7ad11f1383d465370c11de5a2d7ddc.tar.gz
Move shout configuration from :instance, update docs and changelog
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/views/instance_view.ex2
-rw-r--r--lib/pleroma/web/shout_channel.ex2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/instance_view.ex b/lib/pleroma/web/mastodon_api/views/instance_view.ex
index 75964f176..fcb4e2466 100644
--- a/lib/pleroma/web/mastodon_api/views/instance_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/instance_view.ex
@@ -37,7 +37,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
background_upload_limit: Keyword.get(instance, :background_upload_limit),
banner_upload_limit: Keyword.get(instance, :banner_upload_limit),
background_image: Pleroma.Web.Endpoint.url() <> Keyword.get(instance, :background_image),
- shout_limit: Keyword.get(instance, :shout_limit),
+ shout_limit: Config.get([:shout, :limit]),
description_limit: Keyword.get(instance, :description_limit),
pleroma: %{
metadata: %{
diff --git a/lib/pleroma/web/shout_channel.ex b/lib/pleroma/web/shout_channel.ex
index 1d97858d6..dc342fdfb 100644
--- a/lib/pleroma/web/shout_channel.ex
+++ b/lib/pleroma/web/shout_channel.ex
@@ -22,7 +22,7 @@ defmodule Pleroma.Web.ShoutChannel do
def handle_in("new_msg", %{"text" => text}, %{assigns: %{user_name: user_name}} = socket) do
text = String.trim(text)
- if String.length(text) in 1..Pleroma.Config.get([:instance, :shout_limit]) do
+ if String.length(text) in 1..Pleroma.Config.get([:shout, :limit]) do
author = User.get_cached_by_nickname(user_name)
author_json = AccountView.render("show.json", user: author, skip_visibility_check: true)