FIX: featured link topics shouldn't require the same min post length

This commit is contained in:
Neil Lalonde
2016-12-09 15:46:26 -05:00
parent 5da52780e4
commit fb2633366a
4 changed files with 9 additions and 8 deletions

View File

@ -41,7 +41,7 @@ class Validators::PostValidator < ActiveModel::Validator
SiteSetting.private_message_post_length
elsif post.is_first_post? || (post.topic.present? && post.topic.posts_count == 0)
# creating/editing first post
SiteSetting.first_post_length
post.topic&.featured_link&.present? ? (0..SiteSetting.max_post_length) : SiteSetting.first_post_length
else
# regular post
SiteSetting.post_length