diff options
author | lain <lain@soykaf.club> | 2020-04-20 11:45:11 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-04-20 11:45:11 +0200 |
commit | ce23673ca1539350802326c62d6e72bd040950f6 (patch) | |
tree | 18581ae9230fe09cd009a74e085d1c440d4fc0df /lib | |
parent | c8458209110ef65101f965e460329308e5843559 (diff) | |
download | pleroma-ce23673ca1539350802326c62d6e72bd040950f6.tar.gz |
ChatMessageValidator: Don't validate messages that are too long.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/object_validators/chat_message_validator.ex | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pleroma/web/activity_pub/object_validators/chat_message_validator.ex b/lib/pleroma/web/activity_pub/object_validators/chat_message_validator.ex index a4e4460cd..caf2138a7 100644 --- a/lib/pleroma/web/activity_pub/object_validators/chat_message_validator.ex +++ b/lib/pleroma/web/activity_pub/object_validators/chat_message_validator.ex @@ -56,6 +56,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ChatMessageValidator do |> validate_inclusion(:type, ["ChatMessage"]) |> validate_required([:id, :actor, :to, :type, :content]) |> validate_length(:to, is: 1) + |> validate_length(:content, max: Pleroma.Config.get([:instance, :remote_limit])) |> validate_local_concern() end |