diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2019-06-29 00:52:50 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2019-06-29 00:52:50 +0300 |
commit | 657277ffc0d3d25be4376ed629057a2d2cefb2e1 (patch) | |
tree | 3fdd4ca236669df9b2afc5bfcd0e5d6002e23666 /lib/pleroma/web/common_api/common_api.ex | |
parent | c0fa0001476a8a45878a0c75125627164497eddf (diff) | |
parent | c6668c2e7b9908e479527914ca7eb2c838aaab06 (diff) | |
download | pleroma-657277ffc0d3d25be4376ed629057a2d2cefb2e1.tar.gz |
Resolve conflicts
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r-- | lib/pleroma/web/common_api/common_api.ex | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index f5193512e..f8df1e2ea 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -212,7 +212,7 @@ defmodule Pleroma.Web.CommonAPI do cw <- data["spoiler_text"] || "", sensitive <- data["sensitive"] || Enum.member?(tags, {"#nsfw", "nsfw"}), full_payload <- String.trim(status <> cw), - length when length in 1..limit <- String.length(full_payload), + :ok <- validate_character_limit(full_payload, attachments, limit), object <- make_note_data( user.ap_id, @@ -247,6 +247,8 @@ defmodule Pleroma.Web.CommonAPI do res else + {:private_to_public, true} -> {:error, "The message visibility must be direct"} + {:error, _} = e -> e e -> {:error, e} end end |