diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-12-10 08:55:14 +0300 |
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-12-10 08:55:14 +0300 |
| commit | 835ac2157c53e8c85bd3759efe061dbfbdfc367e (patch) | |
| tree | 266959488004bd33200c4ae4d664e665b77b2668 /lib/pleroma/web/chat_channel.ex | |
| parent | 1770602747ae95d95d12c5601f99ced8699e8947 (diff) | |
| parent | 99623b4eca8ad4af0b8e7adc9dd4765ba2922c8b (diff) | |
| download | pleroma-835ac2157c53e8c85bd3759efe061dbfbdfc367e.tar.gz pleroma-835ac2157c53e8c85bd3759efe061dbfbdfc367e.zip | |
Merge remote-tracking branch 'remotes/upstream/develop' into 1427-oauth-admin-scopes
# Conflicts:
# CHANGELOG.md
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}) |
