mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 06:56:01 +08:00
FEATURE: Review posts with media. (#10693)
To check if a post contains any embedded media, we look if the "image_sizes" attribute is present in the new post manager arguments. We want to see one boxed links, but we only store the raw content of the post. To work around this, I extracted the onebox logic from the composer editor into a module.
This commit is contained in:
@ -108,6 +108,11 @@ class NewPostManager
|
||||
|
||||
return :category if post_needs_approval_in_its_category?(manager)
|
||||
|
||||
return :contains_media if (
|
||||
manager.args[:image_sizes].present? &&
|
||||
user.trust_level < SiteSetting.review_media_unless_trust_level.to_i
|
||||
)
|
||||
|
||||
:skip
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user