mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Don't count moderator actions in the user directory stats
This commit is contained in:
parent
9f22be2865
commit
605fe4b11d
@ -54,6 +54,7 @@ class DirectoryItem < ActiveRecord::Base
|
|||||||
AND p.deleted_at IS NULL
|
AND p.deleted_at IS NULL
|
||||||
AND NOT (COALESCE(p.hidden, false))
|
AND NOT (COALESCE(p.hidden, false))
|
||||||
AND NOT COALESCE(c.read_restricted, false)
|
AND NOT COALESCE(c.read_restricted, false)
|
||||||
|
AND p.post_type != :moderator_action
|
||||||
AND u.id > 0
|
AND u.id > 0
|
||||||
GROUP BY u.id",
|
GROUP BY u.id",
|
||||||
period_type: period_types[period_type],
|
period_type: period_types[period_type],
|
||||||
@ -61,6 +62,7 @@ class DirectoryItem < ActiveRecord::Base
|
|||||||
like_type: UserAction::LIKE,
|
like_type: UserAction::LIKE,
|
||||||
was_liked_type: UserAction::WAS_LIKED,
|
was_liked_type: UserAction::WAS_LIKED,
|
||||||
new_topic_type: UserAction::NEW_TOPIC,
|
new_topic_type: UserAction::NEW_TOPIC,
|
||||||
reply_type: UserAction::REPLY
|
reply_type: UserAction::REPLY,
|
||||||
|
moderator_action: Post.types[:moderator_action]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user