Move shout configuration from :instance, update docs and changelog

This commit is contained in:
Mark Felder 2020-08-04 10:42:52 -05:00 committed by Mark Felder
commit d6432a65da
6 changed files with 11 additions and 10 deletions

View file

@ -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: %{

View file

@ -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)