Skip to content

Commit 40ffb1b

Browse files
committed
change post limits to their upstream values
1 parent 8dcecf2 commit 40ffb1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/philomena/posts/post.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ defmodule Philomena.Posts.Post do
3232
|> cast(attrs, [:body, :edit_reason])
3333
|> put_change(:edited_at, edited_at)
3434
|> validate_required([:body])
35-
|> validate_length(:body, min: 1, max: 20_000, count: :bytes)
35+
|> validate_length(:body, min: 1, max: 300_000, count: :bytes)
3636
|> validate_length(:edit_reason, max: 70, count: :bytes)
3737
|> Approval.maybe_put_approval(post.user, :external_links)
3838
end
@@ -42,7 +42,7 @@ defmodule Philomena.Posts.Post do
4242
post
4343
|> cast(attrs, [:body, :anonymous])
4444
|> validate_required([:body])
45-
|> validate_length(:body, min: 1, max: 20_000, count: :bytes)
45+
|> validate_length(:body, min: 1, max: 300_000, count: :bytes)
4646
|> change(attribution)
4747
|> Approval.maybe_put_approval(attribution[:user], :external_links)
4848
end
@@ -53,7 +53,7 @@ defmodule Philomena.Posts.Post do
5353
|> change(anonymous: anonymous?)
5454
|> cast(attrs, [:body])
5555
|> validate_required([:body])
56-
|> validate_length(:body, min: 1, max: 20_000, count: :bytes)
56+
|> validate_length(:body, min: 1, max: 300_000, count: :bytes)
5757
|> change(attribution)
5858
|> change(topic_position: 0)
5959
|> Approval.maybe_put_approval(attribution[:user], :external_links)

0 commit comments

Comments
 (0)