mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: should look through posts for image markdown
Downloaded onebox images only included in the cooked HTML content. So we have to check 'post.cooked' instead of 'raw'. bfdd0fe64c
This commit is contained in:
@@ -108,6 +108,13 @@ class Post < ActiveRecord::Base
|
||||
end
|
||||
}
|
||||
|
||||
scope :have_uploads, -> {
|
||||
where(
|
||||
"(posts.cooked LIKE '%<a %' OR posts.cooked LIKE '%<img %') AND posts.cooked LIKE ?",
|
||||
"%/uploads/#{RailsMultisite::ConnectionManagement.current_db}/%"
|
||||
)
|
||||
}
|
||||
|
||||
delegate :username, to: :user
|
||||
|
||||
def self.hidden_reasons
|
||||
|
||||
Reference in New Issue
Block a user