mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
PERF: move 3 more option columns out of the user table
This commit is contained in:
@ -82,8 +82,6 @@ class UserSerializer < BasicUserSerializer
|
||||
:can_delete_all_posts
|
||||
|
||||
private_attributes :locale,
|
||||
:auto_track_topics_after_msecs,
|
||||
:new_topic_duration_minutes,
|
||||
:muted_category_ids,
|
||||
:tracked_category_ids,
|
||||
:watched_category_ids,
|
||||
@ -253,14 +251,6 @@ class UserSerializer < BasicUserSerializer
|
||||
### PRIVATE ATTRIBUTES
|
||||
###
|
||||
|
||||
def auto_track_topics_after_msecs
|
||||
object.auto_track_topics_after_msecs || SiteSetting.default_other_auto_track_topics_after_msecs
|
||||
end
|
||||
|
||||
def new_topic_duration_minutes
|
||||
object.new_topic_duration_minutes || SiteSetting.default_other_new_topic_duration_minutes
|
||||
end
|
||||
|
||||
def muted_category_ids
|
||||
CategoryUser.lookup(object, :muted).pluck(:category_id)
|
||||
end
|
||||
|
Reference in New Issue
Block a user