mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: Don't count emojis within quotes
This commit is contained in:
@ -32,12 +32,16 @@ class CookedPostProcessor
|
||||
end
|
||||
end
|
||||
|
||||
def has_emoji?
|
||||
(@doc.css("img.emoji") - @doc.css(".quote img")).size > 0
|
||||
end
|
||||
|
||||
def create_firsts
|
||||
return unless Guardian.new.can_see?(@post)
|
||||
|
||||
created = false
|
||||
|
||||
if @doc.css("img.emoji").size > 0
|
||||
if has_emoji?
|
||||
created |= UserFirst.create_for(@post.user_id, :used_emoji, @post.id)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user