diff options
| author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-12-10 00:16:43 +0700 |
|---|---|---|
| committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-12-10 00:16:43 +0700 |
| commit | c098dec47344303bc00456bfbfc0d769abd8f199 (patch) | |
| tree | 709963edcda2d85a5d77ebce4a200ae04fff89cd /lib/pleroma/web/chat_channel.ex | |
| parent | 78299ab18205b0bbaf521640e188a862ca27aa61 (diff) | |
| parent | 0d2c13a119302d0d217a7cb61c28a01c620b1b61 (diff) | |
| download | pleroma-c098dec47344303bc00456bfbfc0d769abd8f199.tar.gz pleroma-c098dec47344303bc00456bfbfc0d769abd8f199.zip | |
Merge branch 'develop' into feature/custom-runtime-modules
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}) |
