diff options
| author | Sadposter <hannah+pleroma@coffee-and-dreams.uk> | 2019-12-10 16:54:25 +0000 |
|---|---|---|
| committer | Sadposter <hannah+pleroma@coffee-and-dreams.uk> | 2019-12-10 16:54:25 +0000 |
| commit | 8cfaab8f04cae6fcc20a37cdb463ee0c93b71217 (patch) | |
| tree | 5ea3e43a73796f264508b583051f6f2143071f00 /lib/pleroma/web/chat_channel.ex | |
| parent | 5abee19b63aa1577f8895b48ae69f0a51edb4dc3 (diff) | |
| parent | aac0187ec13078d2756db1671e644d6eb9c0947b (diff) | |
| download | pleroma-8cfaab8f04cae6fcc20a37cdb463ee0c93b71217.tar.gz pleroma-8cfaab8f04cae6fcc20a37cdb463ee0c93b71217.zip | |
Merge branch 'develop' into 'domain-block-precedence'
# Conflicts:
# lib/pleroma/user.ex
Diffstat (limited to 'lib/pleroma/web/chat_channel.ex')
| -rw-r--r-- | lib/pleroma/web/chat_channel.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/chat_channel.ex b/lib/pleroma/web/chat_channel.ex index 08841a3e8..840414933 100644 --- a/lib/pleroma/web/chat_channel.ex +++ b/lib/pleroma/web/chat_channel.ex @@ -20,7 +20,7 @@ defmodule Pleroma.Web.ChatChannel do def handle_in("new_msg", %{"text" => text}, %{assigns: %{user_name: user_name}} = socket) do text = String.trim(text) - if String.length(text) > 0 do + if String.length(text) in 1..Pleroma.Config.get([:instance, :chat_limit]) do author = User.get_cached_by_nickname(user_name) author = Pleroma.Web.MastodonAPI.AccountView.render("show.json", user: author) message = ChatChannelState.add_message(%{text: text, author: author}) |
